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
diff --git a/test/SemaCXX/warn-reorder-ctor-initialization.cpp b/test/SemaCXX/warn-reorder-ctor-initialization.cpp
index 2634202..f419156 100644
--- a/test/SemaCXX/warn-reorder-ctor-initialization.cpp
+++ b/test/SemaCXX/warn-reorder-ctor-initialization.cpp
@@ -87,3 +87,15 @@
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'}}
+};
+}