summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor-initializer.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2012-09-21 08:58:33 +0000
committerHans Wennborg <hans@hanshq.net>2012-09-21 08:58:33 +0000
commit61b2ffa60f6e75a5ce057ebcc88647d1574e42b0 (patch)
tree43a423cb95b9a354b5e55366f09c0a7283283cc9 /clang/test/SemaCXX/constructor-initializer.cpp
parentad1191fbb68faa69b43c2b6b5aa7d6cefc6f7c6b (diff)
downloadbcm5719-llvm-61b2ffa60f6e75a5ce057ebcc88647d1574e42b0.tar.gz
bcm5719-llvm-61b2ffa60f6e75a5ce057ebcc88647d1574e42b0.zip
Make warnings about uninitialized fields include the field name.
This makes the wording more informative, and consistent with the other warnings about uninitialized variables. Also, me and David who reviewed this couldn't figure out why we would need to do a lookup to get the name of the variable; so just print the name directly. llvm-svn: 164366
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index f503d01f360..ecbe7bf5b9e 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -135,12 +135,12 @@ class InitializeUsingSelfTest {
TwoInOne D;
int E;
InitializeUsingSelfTest(int F)
- : A(A), // expected-warning {{field is uninitialized when used here}}
- B((((B)))), // expected-warning {{field is uninitialized when used here}}
- C(A && InitializeUsingSelfTest::C), // expected-warning {{field is uninitialized when used here}}
- D(D, // expected-warning {{field is uninitialized when used here}}
- D), // expected-warning {{field is uninitialized when used here}}
- E(IntParam(E)) {} // expected-warning {{field is uninitialized when used here}}
+ : A(A), // expected-warning {{field 'A' is uninitialized when used here}}
+ B((((B)))), // expected-warning {{field 'B' is uninitialized when used here}}
+ C(A && InitializeUsingSelfTest::C), // expected-warning {{field 'C' is uninitialized when used here}}
+ D(D, // expected-warning {{field 'D' is uninitialized when used here}}
+ D), // expected-warning {{field 'D' is uninitialized when used here}}
+ E(IntParam(E)) {} // expected-warning {{field 'E' is uninitialized when used here}}
};
int IntWrapper(int &i) { return 0; };
@@ -160,8 +160,8 @@ class CopyConstructorTest {
bool A, B, C;
CopyConstructorTest(const CopyConstructorTest& rhs)
: A(rhs.A),
- B(B), // expected-warning {{field is uninitialized when used here}}
- C(rhs.C || C) { } // expected-warning {{field is uninitialized when used here}}
+ B(B), // expected-warning {{field 'B' is uninitialized when used here}}
+ C(rhs.C || C) { } // expected-warning {{field 'C' is uninitialized when used here}}
};
// Make sure we aren't marking default constructors when we shouldn't be.
OpenPOWER on IntegriCloud