forked from OSchip/llvm-project
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
This commit is contained in:
parent
dc41d791f9
commit
35e1da259f
|
@ -5836,8 +5836,7 @@ public:
|
|||
UnresolvedSetIterator
|
||||
getMostSpecialized(UnresolvedSetIterator SBegin, UnresolvedSetIterator SEnd,
|
||||
TemplateSpecCandidateSet &FailedCandidates,
|
||||
TemplatePartialOrderingContext TPOC,
|
||||
unsigned NumCallArguments, SourceLocation Loc,
|
||||
SourceLocation Loc,
|
||||
const PartialDiagnostic &NoneDiag,
|
||||
const PartialDiagnostic &AmbigDiag,
|
||||
const PartialDiagnostic &CandidateDiag,
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue