diff options
| author | Richard Trieu <rtrieu@google.com> | 2013-08-08 03:05:52 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2013-08-08 03:05:52 +0000 |
| commit | 60a6a4c8ee8f7f891fd0e95af923686b1b6f5f44 (patch) | |
| tree | 27c569464286302a19ca39c632f6b861eb7e09f8 | |
| parent | a8177a02cac1cff1fde70442d805900bfcf23ba1 (diff) | |
| download | bcm5719-llvm-60a6a4c8ee8f7f891fd0e95af923686b1b6f5f44.tar.gz bcm5719-llvm-60a6a4c8ee8f7f891fd0e95af923686b1b6f5f44.zip | |
Split the deprecated increment bool warning into a sub-group of -Wdeprecated
so that it can be toggled independently of other deprecated warnings.
llvm-svn: 187958
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticGroups.td | 2 | ||||
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticSemaKinds.td | 3 | ||||
| -rw-r--r-- | clang/test/SemaCXX/bool.cpp | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/clang/include/clang/Basic/DiagnosticGroups.td b/clang/include/clang/Basic/DiagnosticGroups.td index d3055748dde..93cba3edd9b 100644 --- a/clang/include/clang/Basic/DiagnosticGroups.td +++ b/clang/include/clang/Basic/DiagnosticGroups.td @@ -58,11 +58,13 @@ def AbstractFinalClass : DiagGroup<"abstract-final-class">; def DeprecatedDeclarations : DiagGroup<"deprecated-declarations">; def DeprecatedImplementations :DiagGroup<"deprecated-implementations">; +def DeprecatedIncrementBool : DiagGroup<"deprecated-increment-bool">; def DeprecatedRegister : DiagGroup<"deprecated-register">; def DeprecatedWritableStr : DiagGroup<"deprecated-writable-strings">; // FIXME: Why are DeprecatedImplementations and DeprecatedWritableStr // not in this group? def Deprecated : DiagGroup<"deprecated", [DeprecatedDeclarations, + DeprecatedIncrementBool, DeprecatedRegister]>, DiagCategory<"Deprecations">; diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td index 20b2a40cb08..57425cb0803 100644 --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -4881,7 +4881,8 @@ def note_member_declared_here : Note< "member %0 declared here">; def err_decrement_bool : Error<"cannot decrement expression of type bool">; def warn_increment_bool : Warning< - "incrementing expression of type bool is deprecated">, InGroup<Deprecated>; + "incrementing expression of type bool is deprecated">, + InGroup<DeprecatedIncrementBool>; def err_increment_decrement_enum : Error< "cannot %select{decrement|increment}0 expression of enum type %1">; def err_catch_incomplete_ptr : Error< diff --git a/clang/test/SemaCXX/bool.cpp b/clang/test/SemaCXX/bool.cpp index f027186735b..69c01193578 100644 --- a/clang/test/SemaCXX/bool.cpp +++ b/clang/test/SemaCXX/bool.cpp @@ -1,4 +1,6 @@ // RUN: %clang_cc1 -fsyntax-only -verify -Wno-constant-conversion %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wno-constant-conversion \ +// RUN: -Wno-deprecated -Wdeprecated-increment-bool %s // Bool literals can be enum values. enum { |

