Commit Graph

6 Commits

Author SHA1 Message Date
Ted Kremenek 08479ae7fe Change handling of attribute 'malloc' to only accept the attribute on function
declarations (and not function pointers). This is consistent with GCC. Accepting
this attribute on function pointers means that the attribute should be treated
as a type qualifier, which apparently is not what GCC does. We obviously can
change this later should we desire to enhance the 'malloc' attribute in this
way.

llvm-svn: 79060
2009-08-15 00:51:46 +00:00
Ted Kremenek 8d091dbe13 Add more attribute 'malloc' test cases involving function pointers.
llvm-svn: 79055
2009-08-14 22:06:01 +00:00
Ted Kremenek f22c410efa Per Eli Friedman's feedback, handle attribute 'malloc' being applied to
declarations of function pointers.

llvm-svn: 79053
2009-08-14 22:03:27 +00:00
Benjamin Kramer b3788a24c6 Rename macro to avoid a name clash on FreeBSD.
llvm-svn: 78741
2009-08-11 22:46:25 +00:00
Ryan Flynn e64ffc277c warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type
llvm-svn: 78542
2009-08-09 22:36:29 +00:00
Ryan Flynn 1f1fdc070e map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
llvm-svn: 78541
2009-08-09 20:07:29 +00:00