Expand the coverage of the warning for constants on the RHS of logical operands:
return f() || -1;
where the user meant to write '|'.
This bootstraps without any additional warnings.
Patch by Richard Trieu.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132327 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaCXX/switch.cpp b/test/SemaCXX/switch.cpp
index 3882a1f..8a8cf33 100644
--- a/test/SemaCXX/switch.cpp
+++ b/test/SemaCXX/switch.cpp
@@ -8,7 +8,7 @@
}
int n = 3;
- switch (n && 1) { // expected-warning {{bool}}
+ switch (n && true) { // expected-warning {{bool}}
case 1:
break;
}