diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-02-02 23:35:53 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-02-02 23:35:53 +0000 |
commit | b3dbe28e3196f8f5cc9d5dd834ce1df4dfe1588e (patch) | |
tree | 74a04dbdf68475b129e73e772875ef271db5e796 /clang/test/SemaCXX/uninit-variables.cpp | |
parent | 0c12ed14293b62196d093c0e754166d3e9bb8eaa (diff) | |
download | bcm5719-llvm-b3dbe28e3196f8f5cc9d5dd834ce1df4dfe1588e.tar.gz bcm5719-llvm-b3dbe28e3196f8f5cc9d5dd834ce1df4dfe1588e.zip |
Based on user feedback, swap -Wuninitialized diagnostics to have the warning refer to the bad use, and the note to the variable declaration.
llvm-svn: 124758
Diffstat (limited to 'clang/test/SemaCXX/uninit-variables.cpp')
-rw-r--r-- | clang/test/SemaCXX/uninit-variables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/uninit-variables.cpp b/clang/test/SemaCXX/uninit-variables.cpp index 572e0aac81e..cc5018a5e86 100644 --- a/clang/test/SemaCXX/uninit-variables.cpp +++ b/clang/test/SemaCXX/uninit-variables.cpp @@ -33,11 +33,11 @@ unsigned test3_b() { return x; // no-warning } unsigned test3_c() { - unsigned x ; // expected-warning{{use of uninitialized variable 'x'}} expected-note{{add initialization to silence this warning}} + unsigned x; // expected-note{{declared here}} expected-note{{add initialization}} const bool flag = false; if (flag && (x = test3_aux()) == 0) { x = 1; } - return x; // expected-note{{variable 'x' is possibly uninitialized when used here}} + return x; // expected-warning{{variable 'x' is possibly uninitialized when used here}} } |