Fix the build. Using declarations should not be considering when looking

for overridden virtual methods.

llvm-svn: 106096
This commit is contained in:
John McCall 2010-06-16 09:33:39 +00:00
parent 89d57ae436
commit 38e5f433b2
2 changed files with 19 additions and 1 deletions

View File

@ -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;

View File

@ -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;
}
}