forked from OSchip/llvm-project
Fix the build. Using declarations should not be considering when looking
for overridden virtual methods. llvm-svn: 106096
This commit is contained in:
parent
89d57ae436
commit
38e5f433b2
|
@ -2873,7 +2873,7 @@ static bool FindOverriddenMethod(const CXXBaseSpecifier *Specifier,
|
|||
for (Path.Decls = BaseRecord->lookup(Name);
|
||||
Path.Decls.first != Path.Decls.second;
|
||||
++Path.Decls.first) {
|
||||
NamedDecl *D = (*Path.Decls.first)->getUnderlyingDecl();
|
||||
NamedDecl *D = *Path.Decls.first;
|
||||
if (CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(D)) {
|
||||
if (MD->isVirtual() && !Data->S->IsOverload(Data->Method, MD, false))
|
||||
return true;
|
||||
|
|
|
@ -168,3 +168,21 @@ namespace PureImplicit {
|
|||
struct D : C {};
|
||||
D y;
|
||||
}
|
||||
|
||||
namespace test1 {
|
||||
struct A {
|
||||
virtual void foo() = 0;
|
||||
};
|
||||
|
||||
struct B : A {
|
||||
using A::foo;
|
||||
};
|
||||
|
||||
struct C : B {
|
||||
void foo();
|
||||
};
|
||||
|
||||
void test() {
|
||||
C c;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue