diff options
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 2 | ||||
-rw-r--r-- | clang/test/SemaCXX/using-decl-templates.cpp | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 15e8bc3ab8c..85b5963a39d 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -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; diff --git a/clang/test/SemaCXX/using-decl-templates.cpp b/clang/test/SemaCXX/using-decl-templates.cpp index 13ee1b2dd3e..b7cc69ae521 100644 --- a/clang/test/SemaCXX/using-decl-templates.cpp +++ b/clang/test/SemaCXX/using-decl-templates.cpp @@ -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() { }; +}; |