summaryrefslogtreecommitdiff
path: root/test/Sema/parentheses.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/Sema/parentheses.c')
-rw-r--r--test/Sema/parentheses.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/Sema/parentheses.c b/test/Sema/parentheses.c
index 13ea3ecbe16a2..9751336018b7b 100644
--- a/test/Sema/parentheses.c
+++ b/test/Sema/parentheses.c
@@ -52,6 +52,8 @@ void conditional_op(int x, int y, _Bool b) {
// expected-note {{place parentheses around the '?:' expression to evaluate it first}} \
// expected-note {{place parentheses around the '+' expression to silence this warning}}
+ (void)((x + someConditionFunc()) ? 1 : 2); // no warning
+
(void)(x - b ? 1 : 2); // expected-warning {{operator '?:' has lower precedence than '-'}} \
// expected-note {{place parentheses around the '?:' expression to evaluate it first}} \
// expected-note {{place parentheses around the '-' expression to silence this warning}}
@@ -64,7 +66,6 @@ void conditional_op(int x, int y, _Bool b) {
// expected-note {{place parentheses around the '?:' expression to evaluate it first}} \
// expected-note {{place parentheses around the '/' expression to silence this warning}}
-
(void)(x % 2 ? 1 : 2); // no warning
}