aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/uninit-variables.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2011-09-10 05:35:08 +0000
committerDavid Blaikie <dblaikie@gmail.com>2011-09-10 05:35:08 +0000
commit4f4f349208b2b2307454e169ac7b039e989f003f (patch)
tree69b0eb5ae0525be474402fb09d427a49ec458714 /test/SemaCXX/uninit-variables.cpp
parentb1f251f30eefdb31eae70057087c22f2fe9f0254 (diff)
Show either a location or a fixit note, not both, for uninitialized variable warnings.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/uninit-variables.cpp')
-rw-r--r--test/SemaCXX/uninit-variables.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp
index 9abccf0751..358a572356 100644
--- a/test/SemaCXX/uninit-variables.cpp
+++ b/test/SemaCXX/uninit-variables.cpp
@@ -26,7 +26,7 @@ void unevaluated_tests() {
// Warn for glvalue arguments to typeid whose type is polymorphic.
struct A { virtual ~A() {} };
void polymorphic_test() {
- A *a; // expected-note{{declared here}} expected-note{{add initialization}}
+ A *a; // expected-note{{initialize the variable 'a' to silence this warning}}
(void)typeid(*a); // expected-warning{{variable 'a' is uninitialized when used here }}
}
@@ -50,7 +50,7 @@ unsigned test3_b() {
return x; // no-warning
}
unsigned test3_c() {
- unsigned x; // expected-note{{declared here}} expected-note{{add initialization}}
+ unsigned x; // expected-note{{initialize the variable 'x' to silence this warning}}
const bool flag = false;
if (flag && (x = test3_aux()) == 0) {
x = 1;
@@ -126,7 +126,7 @@ void test_noop_cast()
}
void test_noop_cast2() {
- int x; // expected-note {{declared here}} expected-note {{add initialization}}
+ int x; // expected-note {{initialize the variable 'x' to silence this warning}}
int y = (int&)x; // expected-warning {{uninitialized when used here}}
}
@@ -137,7 +137,7 @@ void test_bitcasts() {
}
void test_bitcasts_2() {
- int x; // expected-note {{declared here}} expected-note {{add initialization}}
+ int x; // expected-note {{initialize the variable 'x' to silence this warning}}
int y = (float &)x; // expected-warning {{uninitialized when used here}}
}