Lines Matching defs:Best
1725 if (Cand->Best)
3807 OverloadCandidateSet::iterator Best;
3809 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) {
3813 CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function);
3819 User.FoundConversionFunction = Best->FoundDecl;
3987 OverloadCandidateSet::iterator Best;
3989 CandidateSet.BestViableFunction(S, From->getBeginLoc(), Best)) {
3994 = dyn_cast<CXXConstructorDecl>(Best->Function)) {
4005 if (Best->Conversions[0].isEllipsis())
4008 User.Before = Best->Conversions[0].Standard;
4014 User.FoundConversionFunction = Best->FoundDecl;
4021 = dyn_cast<CXXConversionDecl>(Best->Function)) {
4028 User.Before = Best->Conversions[0].Standard;
4031 User.FoundConversionFunction = Best->FoundDecl;
4043 User.After = Best->FinalConversion;
5106 OverloadCandidateSet::iterator Best;
5107 switch (CandidateSet.BestViableFunction(S, DeclLoc, Best)) {
5119 if (!Best->FinalConversion.DirectBinding)
5123 ICS.UserDefined.Before = Best->Conversions[0].Standard;
5124 ICS.UserDefined.After = Best->FinalConversion;
5126 ICS.UserDefined.ConversionFunction = Best->Function;
5127 ICS.UserDefined.FoundConversionFunction = Best->FoundDecl;
5138 if (Cand->Best)
6807 OverloadCandidateSet::iterator Best;
6808 switch (CandidateSet.BestViableFunction(*this, Loc, Best)) {
6812 DeclAccessPair::make(Best->Function, Best->FoundDecl.getAccess());
10856 /// \param Best If overload resolution was successful or found a deleted
10857 /// function, \p Best points to the candidate function found.
10862 iterator &Best) {
10899 Best = end();
10901 Cand->Best = false;
10903 if (Best == end() ||
10904 isBetterOverloadCandidate(S, *Cand, *Best, Loc, Kind))
10905 Best = Cand;
10911 Best = end();
10917 if (Best == end())
10923 PendingBest.push_back(&*Best);
10924 Best->Best = true;
10931 if (Cand->Viable && !Cand->Best &&
10934 Cand->Best = true;
10940 Best = end();
10946 if (Best == end())
10949 // Best is the best viable function.
10950 if (Best->Function && Best->Function->isDeleted())
10953 if (auto *M = dyn_cast_or_null<CXXMethodDecl>(Best->Function);
10960 S.diagnoseEquivalentInternalLinkageDeclarations(Loc, Best->Function,
12684 if (!Cand->Best)
13044 auto Best = Matches.begin();
13046 if (isBetterCandidate(I->second, Best->second))
13047 Best = I;
13049 const FunctionDecl *BestFn = Best->second;
13059 Matches[0] = *Best;
13785 OverloadCandidateSet::iterator Best;
13787 Candidates.BestViableFunction(SemaRef, FnLoc, Best);
13798 R.addDecl(Best->FoundDecl.getDecl(), Best->FoundDecl.getAccess());
13841 SemaRef.Diag(Best->Function->getLocation(),
13845 SemaRef.Diag(Best->Function->getLocation(),
13852 SemaRef.Diag(Best->Function->getLocation(),
14039 OverloadCandidateSet::iterator Best;
14041 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best) ==
14065 OverloadCandidateSet::iterator *Best) {
14086 if (Best && *Best != CS.end())
14087 ConsiderCandidate(**Best);
14116 OverloadCandidateSet::iterator *Best,
14121 FunctionDecl *FDecl = (*Best)->Function;
14122 SemaRef.CheckUnresolvedLookupAccess(ULE, (*Best)->FoundDecl);
14126 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl);
14132 static_cast<CallExpr::ADLCallKind>((*Best)->IsADLCandidate));
14136 if (*Best != CandidateSet->end() &&
14140 dyn_cast_if_present<CXXMethodDecl>((*Best)->Function);
14193 FunctionDecl *FDecl = (*Best)->Function;
14201 SemaRef.FixOverloadedFunctionReference(Fn, (*Best)->FoundDecl, FDecl);
14207 static_cast<CallExpr::ADLCallKind>((*Best)->IsADLCandidate));
14215 chooseRecoveryType(*CandidateSet, Best));
14252 OverloadCandidateSet::iterator Best;
14254 CandidateSet.BestViableFunction(*this, Fn->getBeginLoc(), Best);
14260 const FunctionDecl *FDecl = Best->Function;
14273 ExecConfig, &CandidateSet, &Best,
14437 OverloadCandidateSet::iterator Best;
14438 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) {
14441 FunctionDecl *FnDecl = Best->Function;
14450 CheckMemberOperatorAccess(OpLoc, Input, nullptr, Best->FoundDecl);
14457 Input, /*Qualifier=*/nullptr, Best->FoundDecl, Method);
14475 ExprResult FnExpr = CreateFunctionRefExpr(*this, FnDecl, Best->FoundDecl,
14490 static_cast<CallExpr::ADLCallKind>(Best->IsADLCandidate));
14504 Input, Best->BuiltinParamTypes[0], Best->Conversions[0],
14542 StringLiteral *Msg = Best->Function->getDeletedMessage();
14715 OverloadCandidateSet::iterator Best;
14716 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) {
14719 FunctionDecl *FnDecl = Best->Function;
14721 bool IsReversed = Best->isReversed();
14740 if (Best->RewriteKind && ChosenOp == OO_EqualEqual &&
14766 Best->Conversions[ArgIdx]) ==
14824 // Best->Access is only meaningful for class members.
14825 CheckMemberOperatorAccess(OpLoc, Args[0], Args[1], Best->FoundDecl);
14834 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method);
14867 Best->FoundDecl, Base,
14886 static_cast<CallExpr::ADLCallKind>(Best->IsADLCandidate));
14930 if ((Best->RewriteKind & CRK_DifferentOperator) ||
14960 if (Best->RewriteKind != CRK_None)
14969 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0],
14977 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1],
15054 if (isImplicitlyDeleted(Best->Function)) {
15055 FunctionDecl *DeletedFD = Best->Function;
15073 StringLiteral *Msg = Best->Function->getDeletedMessage();
15078 << getOperatorSpelling(Best->Function->getDeclName()
15279 OverloadCandidateSet::iterator Best;
15280 switch (CandidateSet.BestViableFunction(*this, LLoc, Best)) {
15283 FunctionDecl *FnDecl = Best->Function;
15289 CheckMemberOperatorAccess(LLoc, Args[0], ArgExpr, Best->FoundDecl);
15305 Args[0], /*Qualifier=*/nullptr, Best->FoundDecl, Method);
15321 *this, FnDecl, Best->FoundDecl, Base, HadMultipleCandidates,
15349 Args[0], Best->BuiltinParamTypes[0], Best->Conversions[0],
15357 Args[1], Best->BuiltinParamTypes[1], Best->Conversions[1],
15400 StringLiteral *Msg = Best->Function->getDeletedMessage();
15579 OverloadCandidateSet::iterator Best;
15582 Best)) {
15584 Method = cast<CXXMethodDecl>(Best->Function);
15585 FoundDecl = Best->FoundDecl;
15586 CheckUnresolvedMemberAccess(UnresExpr, Best->FoundDecl);
15587 if (DiagnoseUseOfOverloadedDecl(Best->FoundDecl, UnresExpr->getNameLoc()))
15619 CandidateSet, Best->Function, Args, /*IsMember=*/true);
15624 return BuildRecoveryExpr(chooseRecoveryType(CandidateSet, &Best));
15848 OverloadCandidateSet::iterator Best;
15850 Best)) {
15883 StringLiteral *Msg = Best->Function->getDeletedMessage();
15895 if (Best == CandidateSet.end())
15900 if (Best->Function == nullptr) {
15905 Best->Conversions[0].UserDefined.ConversionFunction);
15908 Best->FoundDecl);
15909 if (DiagnoseUseOfDecl(Best->FoundDecl, LParenLoc))
15911 assert(Conv == Best->FoundDecl.getDecl() &&
15919 ExprResult Call = BuildCXXMemberCallExpr(Object.get(), Best->FoundDecl,
15931 CheckMemberOperatorAccess(LParenLoc, Object.get(), nullptr, Best->FoundDecl);
15936 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function);
15948 ExprResult NewFn = CreateFunctionRefExpr(*this, Method, Best->FoundDecl,
15966 Object.get(), /*Qualifier=*/nullptr, Best->FoundDecl, Method);
16050 OverloadCandidateSet::iterator Best;
16051 switch (CandidateSet.BestViableFunction(*this, OpLoc, Best)) {
16088 StringLiteral *Msg = Best->Function->getDeletedMessage();
16099 CheckMemberOperatorAccess(OpLoc, Base, nullptr, Best->FoundDecl);
16102 CXXMethodDecl *Method = cast<CXXMethodDecl>(Best->Function);
16111 Base, /*Qualifier=*/nullptr, Best->FoundDecl, Method);
16118 ExprResult FnExpr = CreateFunctionRefExpr(*this, Method, Best->FoundDecl,
16157 OverloadCandidateSet::iterator Best;
16158 switch (CandidateSet.BestViableFunction(*this, UDSuffixLoc, Best)) {
16179 FunctionDecl *FD = Best->Function;
16180 ExprResult Fn = CreateFunctionRefExpr(*this, FD, Best->FoundDecl,
16257 OverloadCandidateSet::iterator Best;
16259 CandidateSet->BestViableFunction(*this, Fn->getBeginLoc(), Best);
16266 Loc, nullptr, CandidateSet, &Best,