aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 5d50d51df9..a37f3a2b99 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -677,9 +677,10 @@ Decl *TemplateDeclInstantiator::VisitCXXRecordDecl(CXXRecordDecl *D) {
// Look only into the namespace where the friend would be declared to
// find a previous declaration. This is the innermost enclosing namespace,
// as described in ActOnFriendFunctionDecl.
- Sema::LookupResult R;
- SemaRef.LookupQualifiedName(R, DC, Function->getDeclName(),
- Sema::LookupOrdinaryName, true);
+ Sema::LookupResult R(SemaRef, Function->getDeclName(), SourceLocation(),
+ Sema::LookupOrdinaryName,
+ Sema::LookupResult::ForRedeclaration);
+ SemaRef.LookupQualifiedName(R, DC);
PrevDecl = R.getAsSingleDecl(SemaRef.Context);
@@ -837,8 +838,10 @@ TemplateDeclInstantiator::VisitCXXMethodDecl(CXXMethodDecl *D,
NamedDecl *PrevDecl = 0;
if (!FunctionTemplate || TemplateParams) {
- Sema::LookupResult R;
- SemaRef.LookupQualifiedName(R, Owner, Name, Sema::LookupOrdinaryName, true);
+ Sema::LookupResult R(SemaRef, Name, SourceLocation(),
+ Sema::LookupOrdinaryName,
+ Sema::LookupResult::ForRedeclaration);
+ SemaRef.LookupQualifiedName(R, Owner);
PrevDecl = R.getAsSingleDecl(SemaRef.Context);
// In C++, the previous declaration we find might be a tag type