]> granicus.if.org Git - clang/commitdiff
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration...
authorAnders Carlsson <andersca@mac.com>
Fri, 28 Aug 2009 17:57:07 +0000 (17:57 +0000)
committerAnders Carlsson <andersca@mac.com>
Fri, 28 Aug 2009 17:57:07 +0000 (17:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80383 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaDecl.cpp
test/SemaCXX/using-decl-templates.cpp

index 15e8bc3ab8cee0dd016d663941c98407cbbe2fea..85b5963a39d91c4c9431e4aa63dae030dbfcf9fd 100644 (file)
@@ -2899,7 +2899,7 @@ void Sema::CheckFunctionDeclaration(FunctionDecl *NewFD, NamedDecl *&PrevDecl,
     if (PrevDecl && 
         (!AllowOverloadingOfFunction(PrevDecl, Context) || 
          !IsOverload(NewFD, PrevDecl, MatchedDecl)) &&
-        !isa<UsingDecl>(PrevDecl)) {
+        !isa<UsingDecl>(PrevDecl) && !isa<UnresolvedUsingDecl>(PrevDecl)) {
       Redeclaration = true;
       Decl *OldDecl = PrevDecl;
 
index 13ee1b2dd3eba565368227f67b54abc2e91b471d..b7cc69ae52164a650154166e78de232d94260d8c 100644 (file)
@@ -14,3 +14,9 @@ template<typename T> struct B : A<T> {
 };
 
 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() { };
+};