diff options
author | Ted Kremenek <kremenek@apple.com> | 2011-01-21 19:41:41 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2011-01-21 19:41:41 +0000 |
commit | 94b1b4d785bc0f09f6af4be394e59d51f35dda60 (patch) | |
tree | 0c4bd4d1e4199400b2dfb08fe87183dca7b445a6 /test/SemaCXX/uninit-variables.cpp | |
parent | cc15f010672a13b38104a32e3cefc7adc07ffbf7 (diff) |
Enhance -Wuninitialized-experimental diagnostics
to issue the warning at an uninitialized variable's
declaration, but to issue notes at possible
uninitialized uses (which could be multiple).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123994 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/uninit-variables.cpp')
-rw-r--r-- | test/SemaCXX/uninit-variables.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp index 0d6920ceb3..6d2956296a 100644 --- a/test/SemaCXX/uninit-variables.cpp +++ b/test/SemaCXX/uninit-variables.cpp @@ -33,11 +33,11 @@ unsigned test3_b() { return x; // no-warning } unsigned test3_c() { - unsigned x ; + unsigned x ; // expected-warning{{use of uninitialized variable 'x'}} const bool flag = false; if (flag && (x = test3_aux()) == 0) { x = 1; } - return x; // expected-warning{{use of uninitialized variable 'x'}} + return x; // expected-note{{variable 'x' is possibly uninitialized when used here}} } |