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
diff --git a/test/SemaCXX/uninit-variables.cpp b/test/SemaCXX/uninit-variables.cpp
index 9abccf0..358a572 100644
--- a/test/SemaCXX/uninit-variables.cpp
+++ b/test/SemaCXX/uninit-variables.cpp
@@ -26,7 +26,7 @@
// 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 @@
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_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_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}}
}