[analyzer] Fix test in previous commit to account for compiler warning.

--analyze passes -w, but -cc1 -analyze doesn't. Oops!

llvm-svn: 197741
This commit is contained in:
Jordan Rose 2013-12-19 23:05:40 +00:00
parent 458a4851dd
commit 821f102985
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,4 @@
// RUN: %clang_cc1 -analyze -analyzer-checker=core -analyzer-store=region -verify %s
// expected-no-diagnostics
bool PR14634(int x) {
double y = (double)x;
@ -12,7 +11,12 @@ bool PR14634_implicit(int x) {
}
void intAsBoolAsSwitchCondition(int c) {
switch ((bool)c) {
switch ((bool)c) { // expected-warning {{switch condition has boolean value}}
case 0:
break;
}
switch ((int)(bool)c) { // no-warning
case 0:
break;
}