diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-10 21:52:04 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-09-10 21:52:04 +0000 |
commit | 8a8051f2cdfcc1b23956274b4bab19029cf13ed5 (patch) | |
tree | f6b265c189b3ad4bf4705938eb55551a44c9448e /clang/lib/Sema/SemaOverload.cpp | |
parent | 9f0bc5757c8e281c03430162588a4375374e499d (diff) | |
download | bcm5719-llvm-8a8051f2cdfcc1b23956274b4bab19029cf13ed5.tar.gz bcm5719-llvm-8a8051f2cdfcc1b23956274b4bab19029cf13ed5.zip |
Silence "end of non-void function" warnings with llvm_unreachable and add an assert.
llvm-svn: 139474
Diffstat (limited to 'clang/lib/Sema/SemaOverload.cpp')
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 7 |
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 { |