summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index ba1bb2544d2..96b229d2a42 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1309,16 +1309,11 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
break;
case OR_No_Viable_Function:
- if (CandidateSet.empty())
- Diag(Fn->getSourceRange().getBegin(),
- diag::err_ovl_no_viable_function_in_call)
- << Ovl->getName() << Fn->getSourceRange();
- else {
- Diag(Fn->getSourceRange().getBegin(),
- diag::err_ovl_no_viable_function_in_call_with_cands)
- << Ovl->getName() << Fn->getSourceRange();
- PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
- }
+ Diag(Fn->getSourceRange().getBegin(),
+ diag::err_ovl_no_viable_function_in_call)
+ << Ovl->getName() << (unsigned)CandidateSet.size()
+ << Fn->getSourceRange();
+ PrintOverloadCandidates(CandidateSet, /*OnlyViable=*/false);
return true;
case OR_Ambiguous:
OpenPOWER on IntegriCloud