diff options
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/Sema/parentheses.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/Sema/parentheses.c b/clang/test/Sema/parentheses.c index a219c9b342d..52aadde32e3 100644 --- a/clang/test/Sema/parentheses.c +++ b/clang/test/Sema/parentheses.c @@ -28,4 +28,10 @@ void bitwise_rel(unsigned i) { (void)(i || i && i); // expected-warning {{'&&' within '||'}} \ // expected-note {{place parentheses around the '&&' expression to silence this warning}} + (void)(i || i && "w00t"); // no warning. + (void)("w00t" && i || i); // no warning. + (void)(i || i && "w00t" || i); // expected-warning {{'&&' within '||'}} \ + // expected-note {{place parentheses around the '&&' expression to silence this warning}} + (void)(i || "w00t" && i || i); // expected-warning {{'&&' within '||'}} \ + // expected-note {{place parentheses around the '&&' expression to silence this warning}} } |

