diff options
author | Nick Lewycky <nicholas@mxc.ca> | 2010-12-03 01:10:02 +0000 |
---|---|---|
committer | Nick Lewycky <nicholas@mxc.ca> | 2010-12-03 01:10:02 +0000 |
commit | a427b49f99bd2416731de0d4f8bdec12b4807e7c (patch) | |
tree | 23c000b424825e32004f990bd378b048af7ef4e5 | |
parent | ebd4f52093b93fed57dcab6fa3a9033e3850ca4b (diff) |
Add a flag to control the "indirection of non-volatile null pointer will be
deleted, not trap" warning. Fixed PR8729. Patch by Elias Pipping!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120771 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticGroups.td | 1 | ||||
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td index 711380fa39..92b29b2c98 100644 --- a/include/clang/Basic/DiagnosticGroups.td +++ b/include/clang/Basic/DiagnosticGroups.td @@ -75,6 +75,7 @@ def : DiagGroup<"newline-eof">; def LongLong : DiagGroup<"long-long">; def MismatchedTags : DiagGroup<"mismatched-tags">; def MissingFieldInitializers : DiagGroup<"missing-field-initializers">; +def NullDereference : DiagGroup<"null-dereference">; def InitializerOverrides : DiagGroup<"initializer-overrides">; def NonNull : DiagGroup<"nonnull">; def : DiagGroup<"nonportable-cfstrings">; diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 6945c17b92..d3c1a50a66 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -2295,7 +2295,7 @@ def err_typecheck_unary_expr : Error< def err_typecheck_indirection_requires_pointer : Error< "indirection requires pointer operand (%0 invalid)">; def warn_indirection_through_null : Warning< - "indirection of non-volatile null pointer will be deleted, not trap">; + "indirection of non-volatile null pointer will be deleted, not trap">, InGroup<NullDereference>; def note_indirection_through_null : Note< "consider using __builtin_trap() or qualifying pointer with 'volatile'">; |