[cfe-commits] r80383 - in /cfe/trunk: lib/Sema/SemaDecl.cpp test/SemaCXX/using-decl-templates.cpp
Anders Carlsson
andersca at mac.com
Fri Aug 28 10:57:07 PDT 2009
Author: andersca
Date: Fri Aug 28 12:57:07 2009
New Revision: 80383
URL: http://llvm.org/viewvc/llvm-project?rev=80383&view=rev
Log:
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
cfe/trunk/test/SemaCXX/using-decl-templates.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=80383&r1=80382&r2=80383&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Fri Aug 28 12:57:07 2009
@@ -2899,7 +2899,7 @@
if (PrevDecl &&
(!AllowOverloadingOfFunction(PrevDecl, Context) ||
!IsOverload(NewFD, PrevDecl, MatchedDecl)) &&
- !isa<UsingDecl>(PrevDecl)) {
+ !isa<UsingDecl>(PrevDecl) && !isa<UnresolvedUsingDecl>(PrevDecl)) {
Redeclaration = true;
Decl *OldDecl = PrevDecl;
Modified: cfe/trunk/test/SemaCXX/using-decl-templates.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/using-decl-templates.cpp?rev=80383&r1=80382&r2=80383&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/using-decl-templates.cpp (original)
+++ cfe/trunk/test/SemaCXX/using-decl-templates.cpp Fri Aug 28 12:57:07 2009
@@ -14,3 +14,9 @@
};
B<int> a; // expected-note{{in instantiation of template class 'struct B<int>' requested here}}
+
+template<typename T> struct C : A<T> {
+ using A<T>::f;
+
+ void f() { };
+};
More information about the cfe-commits
mailing list