diff options
author | John McCall <rjmccall@apple.com> | 2010-01-08 04:41:39 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-08 04:41:39 +0000 |
commit | 81201626aa08bcc9d05c8b3c6a1d38a7d577c3ce (patch) | |
tree | ecf369f64bf8be1b1618fe7d06cd544b3c8dbe80 /lib/Sema/SemaExprCXX.cpp | |
parent | c31176d5ebbcd407aa512bbd5f717e35da629e7d (diff) |
Change the printing of OR_Deleted overload results to print all the candidates,
not just the viable ones. This is reasonable because the most common use of
deleted functions is to exclude some implicit conversion during calls; users
therefore will want to figure out why some other options were excluded.
Started sorting overload results. Right now it just sorts by location in the
translation unit (after putting viable functions first), but we can do better than
that.
Changed bool OnlyViable parameter to PrintOverloadCandidates to an enum for better
self-documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@92990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index fa1a62b14a..6407441aa1 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -673,20 +673,20 @@ bool Sema::FindAllocationOverload(SourceLocation StartLoc, SourceRange Range, case OR_No_Viable_Function: Diag(StartLoc, diag::err_ovl_no_viable_function_in_call) << Name << Range; - PrintOverloadCandidates(Candidates, /*OnlyViable=*/false); + PrintOverloadCandidates(Candidates, OCD_AllCandidates); return true; case OR_Ambiguous: Diag(StartLoc, diag::err_ovl_ambiguous_call) << Name << Range; - PrintOverloadCandidates(Candidates, /*OnlyViable=*/true); + PrintOverloadCandidates(Candidates, OCD_ViableCandidates); return true; case OR_Deleted: Diag(StartLoc, diag::err_ovl_deleted_call) << Best->Function->isDeleted() << Name << Range; - PrintOverloadCandidates(Candidates, /*OnlyViable=*/true); + PrintOverloadCandidates(Candidates, OCD_AllCandidates); return true; } assert(false && "Unreachable, bad result from BestViableFunction"); |