forked from OSchip/llvm-project
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not.
llvm-svn: 80383
This commit is contained in:
parent
18f4107eb7
commit
01ff6d7094
|
@ -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;
|
||||
|
||||
|
|
|
@ -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() { };
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue