summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor-initializer.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-11-09 01:05:47 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-11-09 01:05:47 +0000
commitd7686ef31c21774bbfc5ce7c051f3d9bb13a78d4 (patch)
tree27c89d744af8136c99fa863e4db801d746ec9859 /clang/test/SemaCXX/constructor-initializer.cpp
parent939ea352441851e550b41b83c3f48e2999f5a63a (diff)
downloadbcm5719-llvm-d7686ef31c21774bbfc5ce7c051f3d9bb13a78d4.tar.gz
bcm5719-llvm-d7686ef31c21774bbfc5ce7c051f3d9bb13a78d4.zip
Unify the codepaths used to verify base and member initializers for explicitly
and implicitly defined constructors. This has a number of benefits: 1. Less code. 2. Explicit and implicit constructors get the same diagnostics. 3. The AST explicitly contains constructor calls from implicit default constructors. This allows handing some cases that previously weren't handled correctly in IRGen without any additional code. Specifically, implicit default constructors containing calls to constructors with default arguments are now handled correctly. llvm-svn: 86500
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index 20cf35b293b..ec871764cf9 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -99,7 +99,9 @@ struct Current : Derived {
// FIXME. This is bad message!
struct M { // expected-note {{candidate function}} \
- // expected-note {{candidate function}}
+ // expected-note {{candidate function}} \
+ // expected-note {{declared here}} \
+ // expected-note {{declared here}}
M(int i, int j); // expected-note {{candidate function}} \
// // expected-note {{candidate function}}
};
@@ -110,9 +112,10 @@ struct N : M {
M m1;
};
-struct P : M { // expected-error {{default constructor for 'struct M' is missing in initialization of base class}}
- P() { }
- M m; // expected-error {{default constructor for 'struct M' is missing in initialization of member}}
+struct P : M {
+ P() { } // expected-error {{base class 'struct M'}} \
+ // expected-error {{member 'm'}}
+ M m; // expected-note {{member is declared here}}
};
struct Q {
OpenPOWER on IntegriCloud