diff options
author | Anders Carlsson <andersca@mac.com> | 2010-03-29 05:13:12 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-03-29 05:13:12 +0000 |
commit | 6f6de731808ffd3664f0a179d1cb694c4e7e5342 (patch) | |
tree | 90a982f80473ab629652608a571262b7bd9e555f /test/SemaCXX/warn-reorder-ctor-initialization.cpp | |
parent | 802c66edc5073991f2315ea84ecace1867c6027f (diff) |
Fix a nasty bug in the virtual base computation which would lead to us initializing virtual bases in the wrong order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@99806 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/warn-reorder-ctor-initialization.cpp')
-rw-r--r-- | test/SemaCXX/warn-reorder-ctor-initialization.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/SemaCXX/warn-reorder-ctor-initialization.cpp b/test/SemaCXX/warn-reorder-ctor-initialization.cpp index 2634202172..f4191565df 100644 --- a/test/SemaCXX/warn-reorder-ctor-initialization.cpp +++ b/test/SemaCXX/warn-reorder-ctor-initialization.cpp @@ -87,3 +87,15 @@ class Anon3 { union {int a,b;}; Anon3() : b(1) {} }; + +namespace T1 { + +struct S1 { }; +struct S2: virtual S1 { }; +struct S3 { }; + +struct S4: virtual S3, S2 { + S4() : S2(), // expected-warning {{base class 'T1::S2' will be initialized after}} + S3() { }; // expected-note {{base 'T1::S3'}} +}; +} |