Fix test to test the right thing.

llvm-svn: 127803
This commit is contained in:
Ted Kremenek 2011-03-17 05:34:58 +00:00
parent 2551fbe928
commit 65ccd1d9b0
1 changed files with 4 additions and 4 deletions

View File

@ -16,8 +16,8 @@ int init(double *);
// -Wuninitialized.
double test() {
double x; // expected-note {{variable 'x' is declared here}} expected-note{{add initialization to silence this warning}}
if (bar() || baz() || Foo() || init(&x)) {
return x; // expected-warning {{variable 'x' is possibly uninitialized when used here}}
}
return 1.0;
if (bar() || baz() || Foo() || init(&x))
return 1.0;
return x; // expected-warning {{variable 'x' is possibly uninitialized when used here}}
}