diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-09-06 20:58:32 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-09-06 20:58:32 +0000 |
commit | f1bb0b049f7292336d3e2229a56e05003820b0f4 (patch) | |
tree | 89662808f7260b3f181da36ff1fe0a6ff1746b30 /test/SemaCXX/warn-assignment-condition.cpp | |
parent | f8b7f7177d722d254e255a7754446148ef514789 (diff) |
Place 'equality comparison with extraneous parentheses...' into a subgroup of -Wparentheses called -Wparentheses-equality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-assignment-condition.cpp')
-rw-r--r-- | test/SemaCXX/warn-assignment-condition.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-assignment-condition.cpp b/test/SemaCXX/warn-assignment-condition.cpp index c0ef35b252..04f2e79525 100644 --- a/test/SemaCXX/warn-assignment-condition.cpp +++ b/test/SemaCXX/warn-assignment-condition.cpp @@ -109,6 +109,12 @@ void test() { if ((x == 5)) {} // expected-warning {{equality comparison with extraneous parentheses}} \ // expected-note {{use '=' to turn this equality comparison into an assignment}} \ // expected-note {{remove extraneous parentheses around the comparison to silence this warning}} + +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wparentheses-equality" + if ((x == 5)) {} // no-warning +#pragma clang diagnostic pop + if ((5 == x)) {} #define EQ(x,y) ((x) == (y)) |