зеркало из https://github.com/microsoft/clang-1.git
Fix a refacto that broke the clang-on-clang build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95994 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
52b2e1e077
Коммит
c1eec891eb
|
@ -1924,8 +1924,6 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
|
|||
if (!MD->isVirtual())
|
||||
continue;
|
||||
|
||||
bool ShouldAddEntryForMethod = true;
|
||||
|
||||
// Check if this method overrides a method in the primary base.
|
||||
if (const CXXMethodDecl *OverriddenMD =
|
||||
OverridesMethodInPrimaryBase(MD, PrimaryBases)) {
|
||||
|
@ -1948,14 +1946,10 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
|
|||
}
|
||||
|
||||
// We don't need to add an entry for this method.
|
||||
ShouldAddEntryForMethod = false;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ShouldAddEntryForMethod)
|
||||
continue;
|
||||
|
||||
if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
|
||||
if (MD->isImplicit()) {
|
||||
assert(!ImplicitVirtualDtor &&
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// PR5021
|
||||
namespace PR5021 {
|
||||
|
||||
struct A {
|
||||
virtual void f(char);
|
||||
};
|
||||
|
@ -16,4 +18,21 @@ struct B : virtual A {
|
|||
|
||||
void f(B * b) {
|
||||
b->f();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Test1 {
|
||||
struct A {
|
||||
virtual ~A();
|
||||
};
|
||||
|
||||
struct B : A {
|
||||
virtual ~B();
|
||||
virtual void f();
|
||||
};
|
||||
|
||||
void f(B *b) {
|
||||
b->f();
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче