diff options
Diffstat (limited to 'test/SemaCXX/warn-assignment-condition.cpp')
-rw-r--r-- | test/SemaCXX/warn-assignment-condition.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-assignment-condition.cpp b/test/SemaCXX/warn-assignment-condition.cpp index 6cfab55440..7596bb26ae 100644 --- a/test/SemaCXX/warn-assignment-condition.cpp +++ b/test/SemaCXX/warn-assignment-condition.cpp @@ -110,6 +110,10 @@ void test() { // expected-note {{use '=' to turn this equality comparison into an assignment}} \ // expected-note {{remove extraneous parentheses around the comparison to silence this warning}} if ((5 == x)) {} + +#define EQ(x,y) ((x) == (y)) + if (EQ(x, 5)) {} +#undef EQ } void (*fn)(); |