diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-10 22:59:25 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-09-10 22:59:25 +0000 |
| commit | 35e1da259fcfbe24d0c8ce2cfd438313c58ffc78 (patch) | |
| tree | e984f733acdeb7b83bc57b7f6dd52ee2d46ea3dd /clang/lib | |
| parent | dc41d791f9949f8674d8709b35c72ea1e4168ae9 (diff) | |
| download | bcm5719-llvm-35e1da259fcfbe24d0c8ce2cfd438313c58ffc78.tar.gz bcm5719-llvm-35e1da259fcfbe24d0c8ce2cfd438313c58ffc78.zip | |
getMostSpecialized for function template sets is never used in the context of a
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.
llvm-svn: 190444
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 4 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaTemplateDeduction.cpp | 5 |
3 files changed, 5 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 7e4e17ba9ef..ea4fe10eac1 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -9491,7 +9491,7 @@ private: // TODO: It looks like FailedCandidates does not serve much purpose // here, since the no_viable diagnostic has index 0. UnresolvedSetIterator Result = S.getMostSpecialized( - MatchesCopy.begin(), MatchesCopy.end(), FailedCandidates, TPOC_Other, 0, + MatchesCopy.begin(), MatchesCopy.end(), FailedCandidates, SourceExpr->getLocStart(), S.PDiag(), S.PDiag(diag::err_addr_ovl_ambiguous) << Matches[0] .second->getDeclName(), diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index d3223356baa..c5b97d608e2 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -6456,7 +6456,7 @@ bool Sema::CheckFunctionTemplateSpecialization( // Find the most specialized function template. UnresolvedSetIterator Result = getMostSpecialized( - Candidates.begin(), Candidates.end(), FailedCandidates, TPOC_Other, 0, + Candidates.begin(), Candidates.end(), FailedCandidates, FD->getLocation(), PDiag(diag::err_function_template_spec_no_match) << FD->getDeclName(), PDiag(diag::err_function_template_spec_ambiguous) @@ -7384,7 +7384,7 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S, // Find the most specialized function template specialization. UnresolvedSetIterator Result = getMostSpecialized( - Matches.begin(), Matches.end(), FailedCandidates, TPOC_Other, 0, + Matches.begin(), Matches.end(), FailedCandidates, D.getIdentifierLoc(), PDiag(diag::err_explicit_instantiation_not_known) << Name, PDiag(diag::err_explicit_instantiation_ambiguous) << Name, diff --git a/clang/lib/Sema/SemaTemplateDeduction.cpp b/clang/lib/Sema/SemaTemplateDeduction.cpp index 47d8e162c8a..30788c45696 100644 --- a/clang/lib/Sema/SemaTemplateDeduction.cpp +++ b/clang/lib/Sema/SemaTemplateDeduction.cpp @@ -4311,7 +4311,6 @@ static bool isSameTemplate(TemplateDecl *T1, TemplateDecl *T2) { UnresolvedSetIterator Sema::getMostSpecialized( UnresolvedSetIterator SpecBegin, UnresolvedSetIterator SpecEnd, TemplateSpecCandidateSet &FailedCandidates, - TemplatePartialOrderingContext TPOC, unsigned NumCallArguments, SourceLocation Loc, const PartialDiagnostic &NoneDiag, const PartialDiagnostic &AmbigDiag, const PartialDiagnostic &CandidateDiag, bool Complain, QualType TargetType) { @@ -4337,7 +4336,7 @@ UnresolvedSetIterator Sema::getMostSpecialized( = cast<FunctionDecl>(*I)->getPrimaryTemplate(); assert(Challenger && "Not a function template specialization?"); if (isSameTemplate(getMoreSpecializedTemplate(BestTemplate, Challenger, - Loc, TPOC, NumCallArguments), + Loc, TPOC_Other, 0), Challenger)) { Best = I; BestTemplate = Challenger; @@ -4352,7 +4351,7 @@ UnresolvedSetIterator Sema::getMostSpecialized( = cast<FunctionDecl>(*I)->getPrimaryTemplate(); if (I != Best && !isSameTemplate(getMoreSpecializedTemplate(BestTemplate, Challenger, - Loc, TPOC, NumCallArguments), + Loc, TPOC_Other, 0), BestTemplate)) { Ambiguous = true; break; |

