Lines Matching refs:Best

1382       if (Cand->Best)  in TryUserDefinedConversion()
3384 OverloadCandidateSet::iterator Best; in IsInitializerListConstructorConversion() local
3386 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsInitializerListConstructorConversion()
3390 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function); in IsInitializerListConstructorConversion()
3396 User.FoundConversionFunction = Best->FoundDecl; in IsInitializerListConstructorConversion()
3564 OverloadCandidateSet::iterator Best; in IsUserDefinedConversion() local
3566 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) { in IsUserDefinedConversion()
3571 = dyn_cast<CXXConstructorDecl>(Best->Function)) { in IsUserDefinedConversion()
3583 if (Best->Conversions[0].isEllipsis()) in IsUserDefinedConversion()
3586 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3592 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3599 = dyn_cast<CXXConversionDecl>(Best->Function)) { in IsUserDefinedConversion()
3606 User.Before = Best->Conversions[0].Standard; in IsUserDefinedConversion()
3609 User.FoundConversionFunction = Best->FoundDecl; in IsUserDefinedConversion()
3621 User.After = Best->FinalConversion; in IsUserDefinedConversion()
4687 OverloadCandidateSet::iterator Best; in FindConversionForRefInit() local
4688 switch (CandidateSet.BestViableFunction(S, DeclLoc, Best)) { in FindConversionForRefInit()
4700 if (!Best->FinalConversion.DirectBinding) in FindConversionForRefInit()
4704 ICS.UserDefined.Before = Best->Conversions[0].Standard; in FindConversionForRefInit()
4705 ICS.UserDefined.After = Best->FinalConversion; in FindConversionForRefInit()
4707 ICS.UserDefined.ConversionFunction = Best->Function; in FindConversionForRefInit()
4708 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl; in FindConversionForRefInit()
4719 if (Cand->Best) in FindConversionForRefInit()
6225 OverloadCandidateSet::iterator Best; in PerformContextualImplicitConversion() local
6226 switch (CandidateSet.BestViableFunction(*this, Loc, Best)) { in PerformContextualImplicitConversion()
6230 DeclAccessPair::make(Best->Function, Best->FoundDecl.getAccess()); in PerformContextualImplicitConversion()
10117 iterator &Best) { in BestViableFunction() argument
10154 Best = end(); in BestViableFunction()
10156 Cand->Best = false; in BestViableFunction()
10158 if (Best == end() || in BestViableFunction()
10159 isBetterOverloadCandidate(S, *Cand, *Best, Loc, Kind)) in BestViableFunction()
10160 Best = Cand; in BestViableFunction()
10164 if (Best == end()) in BestViableFunction()
10170 PendingBest.push_back(&*Best); in BestViableFunction()
10171 Best->Best = true; in BestViableFunction()
10178 if (Cand->Viable && !Cand->Best && in BestViableFunction()
10181 Cand->Best = true; in BestViableFunction()
10187 Best = end(); in BestViableFunction()
10193 if (Best == end()) in BestViableFunction()
10197 if (Best->Function && Best->Function->isDeleted()) in BestViableFunction()
10201 S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function, in BestViableFunction()
11790 if (!Cand->Best) in CompleteCandidates()
12141 auto Best = Matches.begin(); in eliminiateSuboptimalOverloadCandidates() local
12143 if (isBetterCandidate(I->second, Best->second)) in eliminiateSuboptimalOverloadCandidates()
12144 Best = I; in eliminiateSuboptimalOverloadCandidates()
12146 const FunctionDecl *BestFn = Best->second; in eliminiateSuboptimalOverloadCandidates()
12156 Matches[0] = *Best; in eliminiateSuboptimalOverloadCandidates()
12908 OverloadCandidateSet::iterator Best; in DiagnoseTwoPhaseLookup() local
12910 Candidates.BestViableFunction(SemaRef, FnLoc, Best); in DiagnoseTwoPhaseLookup()
12921 R.addDecl(Best->FoundDecl.getDecl(), Best->FoundDecl.getAccess()); in DiagnoseTwoPhaseLookup()
12964 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
12968 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
12975 SemaRef.Diag(Best->Function->getLocation(), in DiagnoseTwoPhaseLookup()
13166 OverloadCandidateSet::iterator Best; in buildOverloadedCallSet() local
13168 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best) == in buildOverloadedCallSet()
13192 OverloadCandidateSet::iterator *Best) { in chooseRecoveryType() argument
13213 if (Best && *Best != CS.end()) in chooseRecoveryType()
13214 ConsiderCandidate(**Best); in chooseRecoveryType()
13243 OverloadCandidateSet::iterator *Best, in FinishOverloadedCallExpr() argument
13248 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
13249 SemaRef.CheckUnresolvedLookupAccess(ULE, (*Best)->FoundDecl); in FinishOverloadedCallExpr()
13252 Fn = SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
13255 (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
13309 FunctionDecl *FDecl = (*Best)->Function; in FinishOverloadedCallExpr()
13310 Fn = SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl); in FinishOverloadedCallExpr()
13313 (*Best)->IsADLCandidate); in FinishOverloadedCallExpr()
13321 chooseRecoveryType(*CandidateSet, Best)); in FinishOverloadedCallExpr()
13362 OverloadCandidateSet::iterator Best; in BuildOverloadedCallExpr() local
13364 CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best); in BuildOverloadedCallExpr()
13367 ExecConfig, &CandidateSet, &Best, in BuildOverloadedCallExpr()
13468 OverloadCandidateSet::iterator Best; in CreateOverloadedUnaryOp() local
13469 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedUnaryOp()
13472 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedUnaryOp()
13481 CheckMemberOperatorAccess(OpLoc, Args[0], nullptr, Best->FoundDecl); in CreateOverloadedUnaryOp()
13485 Best->FoundDecl, Method); in CreateOverloadedUnaryOp()
13503 ExprResult FnExpr = CreateFunctionRefExpr(*this, FnDecl, Best->FoundDecl, in CreateOverloadedUnaryOp()
13517 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedUnaryOp()
13531 Input, Best->BuiltinParamTypes[0], Best->Conversions[0], AA_Passing, in CreateOverloadedUnaryOp()
13744 OverloadCandidateSet::iterator Best; in CreateOverloadedBinOp() local
13745 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in CreateOverloadedBinOp()
13748 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedBinOp()
13750 bool IsReversed = Best->isReversed(); in CreateOverloadedBinOp()
13765 if (Best->RewriteKind && ChosenOp == OO_EqualEqual && in CreateOverloadedBinOp()
13791 Best->Conversions[ArgIdx]) == in CreateOverloadedBinOp()
13824 CheckMemberOperatorAccess(OpLoc, Args[0], Args[1], Best->FoundDecl); in CreateOverloadedBinOp()
13836 Best->FoundDecl, Method); in CreateOverloadedBinOp()
13863 Best->FoundDecl, Base, in CreateOverloadedBinOp()
13875 CurFPFeatureOverrides(), Best->IsADLCandidate); in CreateOverloadedBinOp()
13916 if ((Best->RewriteKind & CRK_DifferentOperator) || in CreateOverloadedBinOp()
13946 if (Best->RewriteKind != CRK_None) in CreateOverloadedBinOp()
13955 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedBinOp()
13962 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedBinOp()
14038 if (isImplicitlyDeleted(Best->Function)) { in CreateOverloadedBinOp()
14039 FunctionDecl *DeletedFD = Best->Function; in CreateOverloadedBinOp()
14058 << getOperatorSpelling(Best->Function->getDeclName() in CreateOverloadedBinOp()
14258 OverloadCandidateSet::iterator Best; in CreateOverloadedArraySubscriptExpr() local
14259 switch (CandidateSet.BestViableFunction(*this, LLoc, Best)) { in CreateOverloadedArraySubscriptExpr()
14262 FunctionDecl *FnDecl = Best->Function; in CreateOverloadedArraySubscriptExpr()
14268 CheckMemberOperatorAccess(LLoc, Args[0], ArgExpr, Best->FoundDecl); in CreateOverloadedArraySubscriptExpr()
14274 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method); in CreateOverloadedArraySubscriptExpr()
14288 *this, FnDecl, Best->FoundDecl, Base, HadMultipleCandidates, in CreateOverloadedArraySubscriptExpr()
14315 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0], in CreateOverloadedArraySubscriptExpr()
14322 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1], in CreateOverloadedArraySubscriptExpr()
14529 OverloadCandidateSet::iterator Best; in BuildCallToMemberFunction() local
14532 Best)) { in BuildCallToMemberFunction()
14534 Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToMemberFunction()
14535 FoundDecl = Best->FoundDecl; in BuildCallToMemberFunction()
14536 CheckUnresolvedMemberAccess(UnresExpr, Best->FoundDecl); in BuildCallToMemberFunction()
14537 if (DiagnoseUseOfDecl(Best->FoundDecl, UnresExpr->getNameLoc())) in BuildCallToMemberFunction()
14576 return BuildRecoveryExpr(chooseRecoveryType(CandidateSet, &Best)); in BuildCallToMemberFunction()
14771 OverloadCandidateSet::iterator Best; in BuildCallToObjectOfClassType() local
14773 Best)) { in BuildCallToObjectOfClassType()
14811 if (Best == CandidateSet.end()) in BuildCallToObjectOfClassType()
14816 if (Best->Function == nullptr) { in BuildCallToObjectOfClassType()
14821 Best->Conversions[0].UserDefined.ConversionFunction); in BuildCallToObjectOfClassType()
14824 Best->FoundDecl); in BuildCallToObjectOfClassType()
14825 if (DiagnoseUseOfDecl(Best->FoundDecl, LParenLoc)) in BuildCallToObjectOfClassType()
14827 assert(Conv == Best->FoundDecl.getDecl() && in BuildCallToObjectOfClassType()
14835 ExprResult Call = BuildCXXMemberCallExpr(Object.get(), Best->FoundDecl, in BuildCallToObjectOfClassType()
14847 CheckMemberOperatorAccess(LParenLoc, Object.get(), nullptr, Best->FoundDecl); in BuildCallToObjectOfClassType()
14852 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildCallToObjectOfClassType()
14864 ExprResult NewFn = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildCallToObjectOfClassType()
14879 Best->FoundDecl, Method); in BuildCallToObjectOfClassType()
14964 OverloadCandidateSet::iterator Best; in BuildOverloadedArrowExpr() local
14965 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) { in BuildOverloadedArrowExpr()
15008 CheckMemberOperatorAccess(OpLoc, Base, nullptr, Best->FoundDecl); in BuildOverloadedArrowExpr()
15011 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function); in BuildOverloadedArrowExpr()
15014 Best->FoundDecl, Method); in BuildOverloadedArrowExpr()
15020 ExprResult FnExpr = CreateFunctionRefExpr(*this, Method, Best->FoundDecl, in BuildOverloadedArrowExpr()
15060 OverloadCandidateSet::iterator Best; in BuildLiteralOperatorCall() local
15061 switch (CandidateSet.BestViableFunction(*this, UDSuffixLoc, Best)) { in BuildLiteralOperatorCall()
15082 FunctionDecl *FD = Best->Function; in BuildLiteralOperatorCall()
15083 ExprResult Fn = CreateFunctionRefExpr(*this, FD, Best->FoundDecl, in BuildLiteralOperatorCall()
15167 OverloadCandidateSet::iterator Best; in BuildForRangeBeginEndCall() local
15169 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best); in BuildForRangeBeginEndCall()
15176 Loc, nullptr, CandidateSet, &Best, in BuildForRangeBeginEndCall()