forked from OSchip/llvm-project
[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:
parent
458a4851dd
commit
821f102985
|
@ -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,8 +11,13 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue