Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not.

llvm-svn: 80383
This commit is contained in:
Anders Carlsson 2009-08-28 17:57:07 +00:00
parent 18f4107eb7
commit 01ff6d7094
2 changed files with 7 additions and 1 deletions

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

View 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() { };
};