]> granicus.if.org Git - clang/commitdiff
getMostSpecialized for function template sets is never used in the context of a
authorRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 10 Sep 2013 22:59:25 +0000 (22:59 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Tue, 10 Sep 2013 22:59:25 +0000 (22:59 +0000)
call; remove its 'number of explicit arguments' and 'what kind of call'
parameters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190444 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Sema/Sema.h
lib/Sema/SemaOverload.cpp
lib/Sema/SemaTemplate.cpp
lib/Sema/SemaTemplateDeduction.cpp

index bcae1037ad6f8ae6bbad40a0e6f7732cb0cb8c24..3e5f462566b50c0ef7ac572394284dff3c3e2b3f 100644 (file)
@@ -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,
index 7e4e17ba9ef02a4be9f609cc350df688b8e8439b..ea4fe10eac16efd1bba4ece72f9ce4c027a40565 100644 (file)
@@ -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(),
index d3223356baadae70338841cbd380e2208eeed12e..c5b97d608e28d2ade2ae0f92ff68e0491777c89f 100644 (file)
@@ -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,
index 47d8e162c8ad4d8fefa39615c25dd43bd2c0f795..30788c456968630df34808d8965400fa15509ba1 100644 (file)
@@ -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;