Lines Matching refs:Best

1599       if (Cand->Best)  in TryUserDefinedConversion()
3647 OverloadCandidateSet::iterator Best; in IsInitializerListConstructorConversion() local
3649 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsInitializerListConstructorConversion()
3653 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function); in IsInitializerListConstructorConversion()
3659 User.FoundConversionFunction = Best->FoundDecl; in IsInitializerListConstructorConversion()
3827 OverloadCandidateSet::iterator Best; in IsUserDefinedConversion() local
3829 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsUserDefinedConversion()
3834 = dyn_cast<CXXConstructorDecl>(Best->Function)) { in IsUserDefinedConversion()
3845 if (Best->Conversions[0].isEllipsis()) in IsUserDefinedConversion()
3848 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3854 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3861 = dyn_cast<CXXConversionDecl>(Best->Function)) { in IsUserDefinedConversion()
3868 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3871 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3883 User.After = Best->FinalConversion; in IsUserDefinedConversion()
4953 OverloadCandidateSet::iterator Best; in FindConversionForRefInit() local
4954 switch (CandidateSet.BestViableFunction(S, DeclLoc, Best)) { in FindConversionForRefInit()
4966 if (!Best->FinalConversion.DirectBinding) in FindConversionForRefInit()
4970 ICS.UserDefined.Before = Best->Conversions[0].Standard; in FindConversionForRefInit()
4971 ICS.UserDefined.After = Best->FinalConversion; in FindConversionForRefInit()
4973 ICS.UserDefined.ConversionFunction = Best->Function; in FindConversionForRefInit()
4974 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl; in FindConversionForRefInit()
4985 if (Cand->Best) in FindConversionForRefInit()
6647 OverloadCandidateSet::iterator Best; in PerformContextualImplicitConversion() local
6648 switch (CandidateSet.BestViableFunction(*this, Loc, Best)) { in PerformContextualImplicitConversion()
6652 DeclAccessPair::make(Best->Function, Best->FoundDecl.getAccess()); in PerformContextualImplicitConversion()
10671 iterator &Best) { in BestViableFunction() argument
10708 Best = end(); in BestViableFunction()
10710 Cand->Best = false; in BestViableFunction()
10712 if (Best == end() || in BestViableFunction()
10713 isBetterOverloadCandidate(S, *Cand, *Best, Loc, Kind)) in BestViableFunction()
10714 Best = Cand; in BestViableFunction()
10720 Best = end(); in BestViableFunction()
10726 if (Best == end()) in BestViableFunction()
10732 PendingBest.push_back(&*Best); in BestViableFunction()
10733 Best->Best = true; in BestViableFunction()
10740 if (Cand->Viable && !Cand->Best && in BestViableFunction()
10743 Cand->Best = true; in BestViableFunction()
10749 Best = end(); in BestViableFunction()
10755 if (Best == end()) in BestViableFunction()
10759 if (Best->Function && Best->Function->isDeleted()) in BestViableFunction()
10763 S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, in BestViableFunction()
12393 if (!Cand->Best) in CompleteCandidates()
12753 auto Best = Matches.begin(); in eliminiateSuboptimalOverloadCandidates() local
12755 if (isBetterCandidate(I->second, Best->second)) in eliminiateSuboptimalOverloadCandidates()
12756 Best = I; in eliminiateSuboptimalOverloadCandidates()
12758 const FunctionDecl *BestFn = Best->second; in eliminiateSuboptimalOverloadCandidates()
12768 Matches[0] = *Best; in eliminiateSuboptimalOverloadCandidates()
13566 OverloadCandidateSet::iterator Best; in DiagnoseTwoPhaseLookup() local
13568 Candidates.BestViableFunction(SemaRef, FnLoc, Best); in DiagnoseTwoPhaseLookup()
13579 R.addDecl(Best->FoundDecl.getDecl(), Best->FoundDecl.getAccess()); in DiagnoseTwoPhaseLookup()
13622 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13626 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13633 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13823 OverloadCandidateSet::iterator Best; in buildOverloadedCallSet() local
13825 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best) == in buildOverloadedCallSet()
13849 OverloadCandidateSet::iterator *Best) { in chooseRecoveryType() argument
13870 if (Best && *Best != CS.end()) in chooseRecoveryType()
13871 ConsiderCandidate(**Best); in chooseRecoveryType()
13900 OverloadCandidateSet::iterator *Best, in FinishOverloadedCallExpr() argument
13905 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
13906 SemaRef.CheckUnresolvedLookupAccess(ULE, (*Best)->FoundDecl); in FinishOverloadedCallExpr()
13910 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
13915 /*IsExecConfig=*/false, (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
13969 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
13971 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
13976 /*IsExecConfig=*/false, (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
13984 chooseRecoveryType(*CandidateSet, Best)); in FinishOverloadedCallExpr()
14025 OverloadCandidateSet::iterator Best; in BuildOverloadedCallExpr() local
14027 CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); in BuildOverloadedCallExpr()
14033 const FunctionDecl *FDecl = Best->Function; in BuildOverloadedCallExpr()
14046 ExecConfig, &CandidateSet, &Best, in BuildOverloadedCallExpr()
14224 OverloadCandidateSet::iterator Best; in CreateOverloadedUnaryOp() local
14225 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedUnaryOp()
14228 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedUnaryOp()
14237 CheckMemberOperatorAccess(OpLoc, Input, nullptr, Best->FoundDecl); in CreateOverloadedUnaryOp()
14244 Input, /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedUnaryOp()
14262 ExprResult FnExpr = CreateFunctionRefExpr(*this, FnDecl, Best->FoundDecl, in CreateOverloadedUnaryOp()
14276 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedUnaryOp()
14290 Input, Best->BuiltinParamTypes[0], Best->Conversions[0], AA_Passing, in CreateOverloadedUnaryOp()
14520 OverloadCandidateSet::iterator Best; in CreateOverloadedBinOp() local
14521 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedBinOp()
14524 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedBinOp()
14526 bool IsReversed = Best->isReversed(); in CreateOverloadedBinOp()
14545 if (Best->RewriteKind && ChosenOp == OO_EqualEqual && in CreateOverloadedBinOp()
14571 Best->Conversions[ArgIdx]) == in CreateOverloadedBinOp()
14623 CheckMemberOperatorAccess(OpLoc, Args[0], Args[1], Best->FoundDecl); in CreateOverloadedBinOp()
14632 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedBinOp()
14665 Best->FoundDecl, Base, in CreateOverloadedBinOp()
14683 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedBinOp()
14723 if ((Best->RewriteKind & CRK_DifferentOperator) || in CreateOverloadedBinOp()
14753 if (Best->RewriteKind != CRK_None) in CreateOverloadedBinOp()
14762 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedBinOp()
14769 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedBinOp()
14845 if (isImplicitlyDeleted(Best->Function)) { in CreateOverloadedBinOp()
14846 FunctionDecl *DeletedFD = Best->Function; in CreateOverloadedBinOp()
14865 << getOperatorSpelling(Best->Function->getDeclName() in CreateOverloadedBinOp()
15065 OverloadCandidateSet::iterator Best; in CreateOverloadedArraySubscriptExpr() local
15066 switch (CandidateSet.BestViableFunction(*this, LLoc, Best)) { in CreateOverloadedArraySubscriptExpr()
15069 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedArraySubscriptExpr()
15075 CheckMemberOperatorAccess(LLoc, Args[0], ArgExpr, Best->FoundDecl); in CreateOverloadedArraySubscriptExpr()
15091 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedArraySubscriptExpr()
15107 *this, FnDecl, Best->FoundDecl, Base, HadMultipleCandidates, in CreateOverloadedArraySubscriptExpr()
15135 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedArraySubscriptExpr()
15142 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedArraySubscriptExpr()
15366 OverloadCandidateSet::iterator Best; in BuildCallToMemberFunction() local
15369 Best)) { in BuildCallToMemberFunction()
15371 Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToMemberFunction()
15372 FoundDecl = Best->FoundDecl; in BuildCallToMemberFunction()
15373 CheckUnresolvedMemberAccess(UnresExpr, Best->FoundDecl); in BuildCallToMemberFunction()
15374 if (DiagnoseUseOfOverloadedDecl(Best->FoundDecl, UnresExpr->getNameLoc())) in BuildCallToMemberFunction()
15413 return BuildRecoveryExpr(chooseRecoveryType(CandidateSet, &Best)); in BuildCallToMemberFunction()
15641 OverloadCandidateSet::iterator Best; in BuildCallToObjectOfClassType() local
15643 Best)) { in BuildCallToObjectOfClassType()
15682 if (Best == CandidateSet.end()) in BuildCallToObjectOfClassType()
15687 if (Best->Function == nullptr) { in BuildCallToObjectOfClassType()
15692 Best->Conversions[0].UserDefined.ConversionFunction); in BuildCallToObjectOfClassType()
15695 Best->FoundDecl); in BuildCallToObjectOfClassType()
15696 if (DiagnoseUseOfDecl(Best->FoundDecl, LParenLoc)) in BuildCallToObjectOfClassType()
15698 assert(Conv == Best->FoundDecl.getDecl() && in BuildCallToObjectOfClassType()
15706 ExprResult Call = BuildCXXMemberCallExpr(Object.get(), Best->FoundDecl, in BuildCallToObjectOfClassType()
15718 CheckMemberOperatorAccess(LParenLoc, Object.get(), nullptr, Best->FoundDecl); in BuildCallToObjectOfClassType()
15723 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToObjectOfClassType()
15735 ExprResult NewFn = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildCallToObjectOfClassType()
15755 Object.get(), /*Qualifier=*/nullptr, Best->FoundDecl, Method); in BuildCallToObjectOfClassType()
15842 OverloadCandidateSet::iterator Best; in BuildOverloadedArrowExpr() local
15843 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in BuildOverloadedArrowExpr()
15887 CheckMemberOperatorAccess(OpLoc, Base, nullptr, Best->FoundDecl); in BuildOverloadedArrowExpr()
15890 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildOverloadedArrowExpr()
15899 Base, /*Qualifier=*/nullptr, Best->FoundDecl, Method); in BuildOverloadedArrowExpr()
15906 ExprResult FnExpr = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildOverloadedArrowExpr()
15947 OverloadCandidateSet::iterator Best; in BuildLiteralOperatorCall() local
15948 switch (CandidateSet.BestViableFunction(*this, UDSuffixLoc, Best)) { in BuildLiteralOperatorCall()
15969 FunctionDecl *FD = Best->Function; in BuildLiteralOperatorCall()
15970 ExprResult Fn = CreateFunctionRefExpr(*this, FD, Best->FoundDecl, in BuildLiteralOperatorCall()
16055 OverloadCandidateSet::iterator Best; in BuildForRangeBeginEndCall() local
16057 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best); in BuildForRangeBeginEndCall()
16064 Loc, nullptr, CandidateSet, &Best, in BuildForRangeBeginEndCall()