diff options
author | Ryan Flynn <pizza@parseerror.com> | 2009-08-09 22:36:29 +0000 |
---|---|---|
committer | Ryan Flynn <pizza@parseerror.com> | 2009-08-09 22:36:29 +0000 |
commit | fd6ad3cf9c8fc6904bd5f33212207aa69743fd45 (patch) | |
tree | 4c3454a4bcb8731ac5ca025d8fb51e998f03e2a5 /include/clang | |
parent | 76168e289ca4b307259e3bc9b3353f03b05bb6b9 (diff) |
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@78542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 39bbe4e481..cc447385f5 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -605,6 +605,8 @@ def err_attr_wrong_decl : Error< "'%0' attribute invalid on this declaration, requires typedef or value">; def warn_attribute_nonnull_no_pointers : Warning< "'nonnull' attribute applied to function with no pointer arguments">; +def warn_attribute_malloc_pointer_only : Warning< + "'malloc' attribute only applies to functions returning pointer type">; def warn_transparent_union_nonpointer : Warning< "'transparent_union' attribute support incomplete; only supported for " "pointer unions">; |