Fixes PR19240. In retrospect, this is a fairly obvious bug. :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204744
91177308-0d34-0410-b5e6-
96231b3b80d8
// morally virtual bases.
for (const auto &I : Base->vbases())
VBasesSeen.insert(I.getType()->getAsCXXRecordDecl());
+ if (I.isVirtual())
+ VBasesSeen.insert(Base);
}
// Sort the paths into buckets, and if any of them are ambiguous, extend all
// MANGLING-DAG: @"\01??_7C@pr17748@@6BA@1@@"
// MANGLING-DAG: @"\01??_7C@pr17748@@6BB@1@@"
}
+
+namespace pr19240 {
+struct A {
+ virtual void c();
+};
+
+struct B : virtual A {
+ virtual void c();
+};
+
+struct C { };
+
+struct D : virtual A, virtual C, B {};
+
+D obj;
+
+// Each MDC only has one vftable.
+
+// MANGLING-DAG: @"\01??_7D@pr19240@@6B@"
+// MANGLING-DAG: @"\01??_7A@pr19240@@6B@"
+// MANGLING-DAG: @"\01??_7B@pr19240@@6B@"
+
+}