Lines Matching refs:Best
1649 if (Cand->Best) in TryUserDefinedConversion()
3681 OverloadCandidateSet::iterator Best; in IsInitializerListConstructorConversion() local
3683 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsInitializerListConstructorConversion()
3687 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function); in IsInitializerListConstructorConversion()
3693 User.FoundConversionFunction = Best->FoundDecl; in IsInitializerListConstructorConversion()
3861 OverloadCandidateSet::iterator Best; in IsUserDefinedConversion() local
3863 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsUserDefinedConversion()
3868 = dyn_cast<CXXConstructorDecl>(Best->Function)) { in IsUserDefinedConversion()
3879 if (Best->Conversions[0].isEllipsis()) in IsUserDefinedConversion()
3882 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3888 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3895 = dyn_cast<CXXConversionDecl>(Best->Function)) { in IsUserDefinedConversion()
3902 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3905 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3917 User.After = Best->FinalConversion; in IsUserDefinedConversion()
4980 OverloadCandidateSet::iterator Best; in FindConversionForRefInit() local
4981 switch (CandidateSet.BestViableFunction(S, DeclLoc, Best)) { in FindConversionForRefInit()
4993 if (!Best->FinalConversion.DirectBinding) in FindConversionForRefInit()
4997 ICS.UserDefined.Before = Best->Conversions[0].Standard; in FindConversionForRefInit()
4998 ICS.UserDefined.After = Best->FinalConversion; in FindConversionForRefInit()
5000 ICS.UserDefined.ConversionFunction = Best->Function; in FindConversionForRefInit()
5001 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl; in FindConversionForRefInit()
5012 if (Cand->Best) in FindConversionForRefInit()
6678 OverloadCandidateSet::iterator Best; in PerformContextualImplicitConversion() local
6679 switch (CandidateSet.BestViableFunction(*this, Loc, Best)) { in PerformContextualImplicitConversion()
6683 DeclAccessPair::make(Best->Function, Best->FoundDecl.getAccess()); in PerformContextualImplicitConversion()
10677 iterator &Best) { in BestViableFunction() argument
10714 Best = end(); in BestViableFunction()
10716 Cand->Best = false; in BestViableFunction()
10718 if (Best == end() || in BestViableFunction()
10719 isBetterOverloadCandidate(S, *Cand, *Best, Loc, Kind)) in BestViableFunction()
10720 Best = Cand; in BestViableFunction()
10726 Best = end(); in BestViableFunction()
10732 if (Best == end()) in BestViableFunction()
10738 PendingBest.push_back(&*Best); in BestViableFunction()
10739 Best->Best = true; in BestViableFunction()
10746 if (Cand->Viable && !Cand->Best && in BestViableFunction()
10749 Cand->Best = true; in BestViableFunction()
10755 Best = end(); in BestViableFunction()
10761 if (Best == end()) in BestViableFunction()
10765 if (Best->Function && Best->Function->isDeleted()) in BestViableFunction()
10768 if (auto *M = dyn_cast_or_null<CXXMethodDecl>(Best->Function); in BestViableFunction()
10775 S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, in BestViableFunction()
12490 if (!Cand->Best) in CompleteCandidates()
12850 auto Best = Matches.begin(); in eliminiateSuboptimalOverloadCandidates() local
12852 if (isBetterCandidate(I->second, Best->second)) in eliminiateSuboptimalOverloadCandidates()
12853 Best = I; in eliminiateSuboptimalOverloadCandidates()
12855 const FunctionDecl *BestFn = Best->second; in eliminiateSuboptimalOverloadCandidates()
12865 Matches[0] = *Best; in eliminiateSuboptimalOverloadCandidates()
13591 OverloadCandidateSet::iterator Best; in DiagnoseTwoPhaseLookup() local
13593 Candidates.BestViableFunction(SemaRef, FnLoc, Best); in DiagnoseTwoPhaseLookup()
13604 R.addDecl(Best->FoundDecl.getDecl(), Best->FoundDecl.getAccess()); in DiagnoseTwoPhaseLookup()
13647 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13651 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13658 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13845 OverloadCandidateSet::iterator Best; in buildOverloadedCallSet() local
13847 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best) == in buildOverloadedCallSet()
13871 OverloadCandidateSet::iterator *Best) { in chooseRecoveryType() argument
13892 if (Best && *Best != CS.end()) in chooseRecoveryType()
13893 ConsiderCandidate(**Best); in chooseRecoveryType()
13922 OverloadCandidateSet::iterator *Best, in FinishOverloadedCallExpr() argument
13927 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
13928 SemaRef.CheckUnresolvedLookupAccess(ULE, (*Best)->FoundDecl); in FinishOverloadedCallExpr()
13932 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
13937 /*IsExecConfig=*/false, (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
13941 if (*Best != CandidateSet->end() && in FinishOverloadedCallExpr()
13945 dyn_cast_if_present<CXXMethodDecl>((*Best)->Function); in FinishOverloadedCallExpr()
13998 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
14006 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
14011 /*IsExecConfig=*/false, (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
14019 chooseRecoveryType(*CandidateSet, Best)); in FinishOverloadedCallExpr()
14056 OverloadCandidateSet::iterator Best; in BuildOverloadedCallExpr() local
14058 CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); in BuildOverloadedCallExpr()
14064 const FunctionDecl *FDecl = Best->Function; in BuildOverloadedCallExpr()
14077 ExecConfig, &CandidateSet, &Best, in BuildOverloadedCallExpr()
14241 OverloadCandidateSet::iterator Best; in CreateOverloadedUnaryOp() local
14242 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedUnaryOp()
14245 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedUnaryOp()
14254 CheckMemberOperatorAccess(OpLoc, Input, nullptr, Best->FoundDecl); in CreateOverloadedUnaryOp()
14261 Input, /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedUnaryOp()
14279 ExprResult FnExpr = CreateFunctionRefExpr(*this, FnDecl, Best->FoundDecl, in CreateOverloadedUnaryOp()
14293 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedUnaryOp()
14307 Input, Best->BuiltinParamTypes[0], Best->Conversions[0], AA_Passing, in CreateOverloadedUnaryOp()
14344 StringLiteral *Msg = Best->Function->getDeletedMessage(); in CreateOverloadedUnaryOp()
14517 OverloadCandidateSet::iterator Best; in CreateOverloadedBinOp() local
14518 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedBinOp()
14521 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedBinOp()
14523 bool IsReversed = Best->isReversed(); in CreateOverloadedBinOp()
14542 if (Best->RewriteKind && ChosenOp == OO_EqualEqual && in CreateOverloadedBinOp()
14568 Best->Conversions[ArgIdx]) == in CreateOverloadedBinOp()
14627 CheckMemberOperatorAccess(OpLoc, Args[0], Args[1], Best->FoundDecl); in CreateOverloadedBinOp()
14636 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedBinOp()
14669 Best->FoundDecl, Base, in CreateOverloadedBinOp()
14687 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedBinOp()
14729 if ((Best->RewriteKind & CRK_DifferentOperator) || in CreateOverloadedBinOp()
14759 if (Best->RewriteKind != CRK_None) in CreateOverloadedBinOp()
14768 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedBinOp()
14775 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedBinOp()
14851 if (isImplicitlyDeleted(Best->Function)) { in CreateOverloadedBinOp()
14852 FunctionDecl *DeletedFD = Best->Function; in CreateOverloadedBinOp()
14870 StringLiteral *Msg = Best->Function->getDeletedMessage(); in CreateOverloadedBinOp()
14875 << getOperatorSpelling(Best->Function->getDeclName() in CreateOverloadedBinOp()
15076 OverloadCandidateSet::iterator Best; in CreateOverloadedArraySubscriptExpr() local
15077 switch (CandidateSet.BestViableFunction(*this, LLoc, Best)) { in CreateOverloadedArraySubscriptExpr()
15080 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedArraySubscriptExpr()
15086 CheckMemberOperatorAccess(LLoc, Args[0], ArgExpr, Best->FoundDecl); in CreateOverloadedArraySubscriptExpr()
15102 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedArraySubscriptExpr()
15118 *this, FnDecl, Best->FoundDecl, Base, HadMultipleCandidates, in CreateOverloadedArraySubscriptExpr()
15146 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedArraySubscriptExpr()
15153 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedArraySubscriptExpr()
15195 StringLiteral *Msg = Best->Function->getDeletedMessage(); in CreateOverloadedArraySubscriptExpr()
15374 OverloadCandidateSet::iterator Best; in BuildCallToMemberFunction() local
15377 Best)) { in BuildCallToMemberFunction()
15379 Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToMemberFunction()
15380 FoundDecl = Best->FoundDecl; in BuildCallToMemberFunction()
15381 CheckUnresolvedMemberAccess(UnresExpr, Best->FoundDecl); in BuildCallToMemberFunction()
15382 if (DiagnoseUseOfOverloadedDecl(Best->FoundDecl, UnresExpr->getNameLoc())) in BuildCallToMemberFunction()
15414 CandidateSet, Best->Function, Args, /*IsMember=*/true); in BuildCallToMemberFunction()
15419 return BuildRecoveryExpr(chooseRecoveryType(CandidateSet, &Best)); in BuildCallToMemberFunction()
15645 OverloadCandidateSet::iterator Best; in BuildCallToObjectOfClassType() local
15647 Best)) { in BuildCallToObjectOfClassType()
15680 StringLiteral *Msg = Best->Function->getDeletedMessage(); in BuildCallToObjectOfClassType()
15692 if (Best == CandidateSet.end()) in BuildCallToObjectOfClassType()
15697 if (Best->Function == nullptr) { in BuildCallToObjectOfClassType()
15702 Best->Conversions[0].UserDefined.ConversionFunction); in BuildCallToObjectOfClassType()
15705 Best->FoundDecl); in BuildCallToObjectOfClassType()
15706 if (DiagnoseUseOfDecl(Best->FoundDecl, LParenLoc)) in BuildCallToObjectOfClassType()
15708 assert(Conv == Best->FoundDecl.getDecl() && in BuildCallToObjectOfClassType()
15716 ExprResult Call = BuildCXXMemberCallExpr(Object.get(), Best->FoundDecl, in BuildCallToObjectOfClassType()
15728 CheckMemberOperatorAccess(LParenLoc, Object.get(), nullptr, Best->FoundDecl); in BuildCallToObjectOfClassType()
15733 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToObjectOfClassType()
15745 ExprResult NewFn = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildCallToObjectOfClassType()
15763 Object.get(), /*Qualifier=*/nullptr, Best->FoundDecl, Method); in BuildCallToObjectOfClassType()
15847 OverloadCandidateSet::iterator Best; in BuildOverloadedArrowExpr() local
15848 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in BuildOverloadedArrowExpr()
15885 StringLiteral *Msg = Best->Function->getDeletedMessage(); in BuildOverloadedArrowExpr()
15896 CheckMemberOperatorAccess(OpLoc, Base, nullptr, Best->FoundDecl); in BuildOverloadedArrowExpr()
15899 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildOverloadedArrowExpr()
15908 Base, /*Qualifier=*/nullptr, Best->FoundDecl, Method); in BuildOverloadedArrowExpr()
15915 ExprResult FnExpr = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildOverloadedArrowExpr()
15954 OverloadCandidateSet::iterator Best; in BuildLiteralOperatorCall() local
15955 switch (CandidateSet.BestViableFunction(*this, UDSuffixLoc, Best)) { in BuildLiteralOperatorCall()
15976 FunctionDecl *FD = Best->Function; in BuildLiteralOperatorCall()
15977 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()