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