aboutsummaryrefslogtreecommitdiff
path: root/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
commit49c16da71b9c95cc53b4af6de2833a022cb69b6a (patch)
treea23a96e60a913aeb5abc11df742f7f71732ad090 /test/SemaCXX/constructor-initializer.cpp
parenta8ce9ecae8670fe8e189755b14d73fd84087e51f (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@86500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--test/SemaCXX/constructor-initializer.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/SemaCXX/constructor-initializer.cpp b/test/SemaCXX/constructor-initializer.cpp
index 20cf35b293..ec871764cf 100644
--- a/test/SemaCXX/constructor-initializer.cpp
+++ b/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 {