diff options
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index b354827e01..503d318c4c 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -657,8 +657,9 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D, NamedDecl *PrevDecl = 0; if (!FunctionTemplate || TemplateParams) { - PrevDecl = SemaRef.LookupQualifiedName(Owner, Name, - Sema::LookupOrdinaryName, true); + Sema::LookupResult R; + SemaRef.LookupQualifiedName(R, Owner, Name, Sema::LookupOrdinaryName, true); + PrevDecl = R.getAsSingleDecl(SemaRef.Context); // In C++, the previous declaration we find might be a tag type // (class or enum). In this case, the new declaration will hide the |