diff options
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaLookup.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 00be9d91350..3cfe53c65a3 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2834,6 +2834,7 @@ Sema::BuildMemberReferenceExpr(ExprArg Base, QualType BaseExprType, Diag(MemberDecl->getLocation(), diag::note_member_declared_here) << MemberName; + R.suppressDiagnostics(); return ExprError(); } @@ -3514,7 +3515,8 @@ Sema::ActOnCallExpr(Scope *S, ExprArg fn, SourceLocation LParenLoc, // declarations (all methods or method templates) or a single // method template. assert((MemE->getNumDecls() > 1) || - isa<FunctionTemplateDecl>(*MemE->decls_begin())); + isa<FunctionTemplateDecl>( + (*MemE->decls_begin())->getUnderlyingDecl())); (void)MemE; return BuildCallToMemberFunction(S, Fn, LParenLoc, Args, NumArgs, diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp index 558bd4eb96b..1b2401a80cb 100644 --- a/clang/lib/Sema/SemaLookup.cpp +++ b/clang/lib/Sema/SemaLookup.cpp @@ -299,9 +299,10 @@ void LookupResult::resolveKind() { // If there's a single decl, we need to examine it to decide what // kind of lookup this is. if (N == 1) { - if (isa<FunctionTemplateDecl>(*Decls.begin())) + NamedDecl *D = (*Decls.begin())->getUnderlyingDecl(); + if (isa<FunctionTemplateDecl>(D)) ResultKind = FoundOverloaded; - else if (isa<UnresolvedUsingValueDecl>(*Decls.begin())) + else if (isa<UnresolvedUsingValueDecl>(D)) ResultKind = FoundUnresolvedValue; return; } |

