summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constructor-initializer.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-04-10 07:37:23 +0000
committerJohn McCall <rjmccall@apple.com>2010-04-10 07:37:23 +0000
commitbb7b658ab5d0e46a7a5af11bfdba8cac80173307 (patch)
treeb4315412eff1b7650fc0c4e009a1406ee9988be9 /clang/test/SemaCXX/constructor-initializer.cpp
parentd394aec87d92085ca145e0b12ccc7927d8bb7231 (diff)
downloadbcm5719-llvm-bb7b658ab5d0e46a7a5af11bfdba8cac80173307.tar.gz
bcm5719-llvm-bb7b658ab5d0e46a7a5af11bfdba8cac80173307.zip
Diagnose misordered initializers in constructor templates immediately instead of
when they're instantiated. Merge the note into the -Wreorder warning; it doesn't really contribute much, and it was splitting a thought across diagnostics anyway. Don't crash in the parser when a constructor's initializers end in a comma and there's no body; the recovery here is still terrible, but anything's better than a crash. llvm-svn: 100922
Diffstat (limited to 'clang/test/SemaCXX/constructor-initializer.cpp')
-rw-r--r--clang/test/SemaCXX/constructor-initializer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/test/SemaCXX/constructor-initializer.cpp b/clang/test/SemaCXX/constructor-initializer.cpp
index 8b23e130094..a22c4170324 100644
--- a/clang/test/SemaCXX/constructor-initializer.cpp
+++ b/clang/test/SemaCXX/constructor-initializer.cpp
@@ -87,12 +87,11 @@ struct Derived : Base, Base1, virtual V {
struct Current : Derived {
int Derived;
- Current() : Derived(1), ::Derived(), // expected-warning {{member 'Derived' will be initialized after}} \
- // expected-note {{base '::Derived'}} \
- // expected-warning {{base class '::Derived' will be initialized after}}
+ Current() : Derived(1), ::Derived(), // expected-warning {{field 'Derived' will be initialized after base '::Derived'}} \
+ // expected-warning {{base class '::Derived' will be initialized after base 'Derived::V'}}
::Derived::Base(), // expected-error {{type '::Derived::Base' is not a direct or virtual base of 'Current'}}
Derived::Base1(), // expected-error {{type 'Derived::Base1' is not a direct or virtual base of 'Current'}}
- Derived::V(), // expected-note {{base 'Derived::V'}}
+ Derived::V(),
::NonExisting(), // expected-error {{member initializer 'NonExisting' does not name a non-static data member or}}
INT::NonExisting() {} // expected-error {{expected a class or namespace}} \
// expected-error {{member initializer 'NonExisting' does not name a non-static data member or}}
OpenPOWER on IntegriCloud