diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-03-17 05:34:58 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-03-17 05:34:58 +0000 |
commit | 53b24ebc37e6edd14ed31e2ef7cbed094ee87e51 (patch) | |
tree | be29d0b6979c4746c6896886f9783ab659cbd424 /test/SemaCXX/uninit-variables-conditional.cpp | |
parent | c5e43c19ddb40b8a1371291f73ae66fe54951ca5 (diff) |
Fix test to test the right thing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127803 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/uninit-variables-conditional.cpp')
-rw-r--r-- | test/SemaCXX/uninit-variables-conditional.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/uninit-variables-conditional.cpp b/test/SemaCXX/uninit-variables-conditional.cpp index 1a822853d9..257a9b575f 100644 --- a/test/SemaCXX/uninit-variables-conditional.cpp +++ b/test/SemaCXX/uninit-variables-conditional.cpp @@ -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}} } |