summaryrefslogtreecommitdiff
path: root/test/SemaCXX/bool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/bool.cpp')
-rw-r--r--test/SemaCXX/bool.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/SemaCXX/bool.cpp b/test/SemaCXX/bool.cpp
index 726fa6cb60fc1..2b3ab68848ebf 100644
--- a/test/SemaCXX/bool.cpp
+++ b/test/SemaCXX/bool.cpp
@@ -25,6 +25,9 @@ void static_assert_arg_is_bool(T x) {
void test2() {
int n = 2;
- static_assert_arg_is_bool(n && 4); // expected-warning {{use of logical && with constant operand}}
- static_assert_arg_is_bool(n || 5); // expected-warning {{use of logical || with constant operand}}
+ static_assert_arg_is_bool(n && 4); // expected-warning {{use of logical '&&' with constant operand}} \
+ // expected-note {{use '&' for a bitwise operation}} \
+ // expected-note {{remove constant to silence this warning}}
+ static_assert_arg_is_bool(n || 5); // expected-warning {{use of logical '||' with constant operand}} \
+ // expected-note {{use '|' for a bitwise operation}}
}