[cfe-commits] r106096 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/abstract.cpp
John McCall
rjmccall at apple.com
Wed Jun 16 02:33:39 PDT 2010
Author: rjmccall
Date: Wed Jun 16 04:33:39 2010
New Revision: 106096
URL: http://llvm.org/viewvc/llvm-project?rev=106096&view=rev
Log:
Fix the build. Using declarations should not be considering when looking
for overridden virtual methods.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/SemaCXX/abstract.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=106096&r1=106095&r2=106096&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Jun 16 04:33:39 2010
@@ -2873,7 +2873,7 @@
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;
Modified: cfe/trunk/test/SemaCXX/abstract.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/abstract.cpp?rev=106096&r1=106095&r2=106096&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/abstract.cpp (original)
+++ cfe/trunk/test/SemaCXX/abstract.cpp Wed Jun 16 04:33:39 2010
@@ -168,3 +168,21 @@
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;
+ }
+}
More information about the cfe-commits
mailing list