diff options
Diffstat (limited to 'clang/test/SemaCXX/warn-assignment-condition.cpp')
| -rw-r--r-- | clang/test/SemaCXX/warn-assignment-condition.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/warn-assignment-condition.cpp b/clang/test/SemaCXX/warn-assignment-condition.cpp index 9dcffbfe84e..48cc137dac7 100644 --- a/clang/test/SemaCXX/warn-assignment-condition.cpp +++ b/clang/test/SemaCXX/warn-assignment-condition.cpp @@ -105,4 +105,8 @@ void test() { if (a |= b) {} // expected-warning {{using the result of an assignment as a condition without parentheses}} \ // expected-note{{use '!=' to turn this compound assignment into an inequality comparison}} \ // expected-note{{place parentheses around the assignment to silence this warning}} + + 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}} } |

