summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaOverload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r--clang/lib/Sema/SemaOverload.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp
index c200daedfbb..cce4057dd74 100644
--- a/clang/lib/Sema/SemaOverload.cpp
+++ b/clang/lib/Sema/SemaOverload.cpp
@@ -7288,10 +7288,12 @@ SourceLocation GetLocationForCandidate(const OverloadCandidate *Cand) {
return SourceLocation();
}
-static unsigned RankDeductionFailure(
- const OverloadCandidate::DeductionFailureInfo &DFI) {
+static unsigned
+RankDeductionFailure(const OverloadCandidate::DeductionFailureInfo &DFI) {
switch ((Sema::TemplateDeductionResult)DFI.Result) {
case Sema::TDK_Success:
+ assert(0 && "TDK_success while diagnosing bad deduction");
+
case Sema::TDK_Incomplete:
return 1;
@@ -7314,6 +7316,7 @@ static unsigned RankDeductionFailure(
case Sema::TDK_TooFewArguments:
return 6;
}
+ llvm_unreachable("Unhandled deduction result");
}
struct CompareOverloadCandidatesForDisplay {
OpenPOWER on IntegriCloud