• Home
  • Raw
  • Download

Lines Matching refs:Cand

1238     for (OverloadCandidateSet::iterator Cand = Conversions.begin();  in TryUserDefinedConversion()  local
1239 Cand != Conversions.end(); ++Cand) in TryUserDefinedConversion()
1240 if (Cand->Viable) in TryUserDefinedConversion()
1241 ICS.Ambiguous.addConversion(Cand->FoundDecl, Cand->Function); in TryUserDefinedConversion()
4267 for (OverloadCandidateSet::iterator Cand = CandidateSet.begin(); in FindConversionForRefInit() local
4268 Cand != CandidateSet.end(); ++Cand) in FindConversionForRefInit()
4269 if (Cand->Viable) in FindConversionForRefInit()
4270 ICS.Ambiguous.addConversion(Cand->FoundDecl, Cand->Function); in FindConversionForRefInit()
8463 for (OverloadCandidateSet::iterator Cand = CandidateSet.begin(), in AddArgumentDependentLookupCandidates() local
8465 Cand != CandEnd; ++Cand) in AddArgumentDependentLookupCandidates()
8466 if (Cand->Function) { in AddArgumentDependentLookupCandidates()
8467 Fns.erase(Cand->Function); in AddArgumentDependentLookupCandidates()
8468 if (FunctionTemplateDecl *FunTmpl = Cand->Function->getPrimaryTemplate()) in AddArgumentDependentLookupCandidates()
8771 [](OverloadCandidate &Cand) { return &Cand; }); in BestViableFunction() argument
8783 llvm::any_of(Candidates, [&](OverloadCandidate *Cand) { in BestViableFunction() argument
8784 return Cand->Function && in BestViableFunction()
8785 S.IdentifyCUDAPreference(Caller, Cand->Function) == in BestViableFunction()
8789 auto IsWrongSideCandidate = [&](OverloadCandidate *Cand) { in BestViableFunction() argument
8790 return Cand->Function && in BestViableFunction()
8791 S.IdentifyCUDAPreference(Caller, Cand->Function) == in BestViableFunction()
8802 for (auto *Cand : Candidates) in BestViableFunction() local
8803 if (Cand->Viable) in BestViableFunction()
8804 if (Best == end() || isBetterOverloadCandidate(S, *Cand, *Best, Loc, in BestViableFunction()
8806 Best = Cand; in BestViableFunction()
8816 for (auto *Cand : Candidates) { in BestViableFunction() local
8817 if (Cand->Viable && in BestViableFunction()
8818 Cand != Best && in BestViableFunction()
8819 !isBetterOverloadCandidate(S, *Best, *Cand, Loc, in BestViableFunction()
8822 Cand->Function)) { in BestViableFunction()
8823 EquivalentCands.push_back(Cand->Function); in BestViableFunction()
9057 static void DiagnoseBadConversion(Sema &S, OverloadCandidate *Cand, in DiagnoseBadConversion() argument
9059 const ImplicitConversionSequence &Conv = Cand->Conversions[I]; in DiagnoseBadConversion()
9061 assert(Cand->Function && "for now, candidate must be a function"); in DiagnoseBadConversion()
9062 FunctionDecl *Fn = Cand->Function; in DiagnoseBadConversion()
9077 ClassifyOverloadCandidate(S, Cand->FoundDecl, Fn, FnDesc); in DiagnoseBadConversion()
9094 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9125 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9136 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9147 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9156 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9174 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9185 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9201 << (unsigned) (Cand->Fix.Kind); in DiagnoseBadConversion()
9203 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9242 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9254 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9267 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9273 !checkAddressOfCandidateIsAvailable(S, Cand->Function)) in DiagnoseBadConversion()
9281 << (unsigned) (Cand->Fix.Kind); in DiagnoseBadConversion()
9284 for (std::vector<FixItHint>::iterator HI = Cand->Fix.Hints.begin(), in DiagnoseBadConversion()
9285 HE = Cand->Fix.Hints.end(); HI != HE; ++HI) in DiagnoseBadConversion()
9289 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in DiagnoseBadConversion()
9295 static bool CheckArityMismatch(Sema &S, OverloadCandidate *Cand, in CheckArityMismatch() argument
9297 FunctionDecl *Fn = Cand->Function; in CheckArityMismatch()
9310 assert((Cand->FailureKind == ovl_fail_too_few_arguments) || in CheckArityMismatch()
9311 (Cand->FailureKind == ovl_fail_bad_deduction && in CheckArityMismatch()
9312 Cand->DeductionFailure.Result == Sema::TDK_TooFewArguments)); in CheckArityMismatch()
9314 assert((Cand->FailureKind == ovl_fail_too_many_arguments) || in CheckArityMismatch()
9315 (Cand->FailureKind == ovl_fail_bad_deduction && in CheckArityMismatch()
9316 Cand->DeductionFailure.Result == Sema::TDK_TooManyArguments)); in CheckArityMismatch()
9369 static void DiagnoseArityMismatch(Sema &S, OverloadCandidate *Cand, in DiagnoseArityMismatch() argument
9371 if (!CheckArityMismatch(S, Cand, NumFormalArgs)) in DiagnoseArityMismatch()
9372 DiagnoseArityMismatch(S, Cand->FoundDecl, Cand->Function, NumFormalArgs); in DiagnoseArityMismatch()
9595 static void DiagnoseBadDeduction(Sema &S, OverloadCandidate *Cand, in DiagnoseBadDeduction() argument
9598 unsigned TDK = Cand->DeductionFailure.Result; in DiagnoseBadDeduction()
9600 if (CheckArityMismatch(S, Cand, NumArgs)) in DiagnoseBadDeduction()
9603 DiagnoseBadDeduction(S, Cand->FoundDecl, Cand->Function, // pattern in DiagnoseBadDeduction()
9604 Cand->DeductionFailure, NumArgs, TakingCandidateAddress); in DiagnoseBadDeduction()
9608 static void DiagnoseBadTarget(Sema &S, OverloadCandidate *Cand) { in DiagnoseBadTarget() argument
9610 FunctionDecl *Callee = Cand->Function; in DiagnoseBadTarget()
9617 ClassifyOverloadCandidate(S, Cand->FoundDecl, Callee, FnDesc); in DiagnoseBadTarget()
9663 static void DiagnoseFailedEnableIfAttr(Sema &S, OverloadCandidate *Cand) { in DiagnoseFailedEnableIfAttr() argument
9664 FunctionDecl *Callee = Cand->Function; in DiagnoseFailedEnableIfAttr()
9665 EnableIfAttr *Attr = static_cast<EnableIfAttr*>(Cand->DeductionFailure.Data); in DiagnoseFailedEnableIfAttr()
9685 static void NoteFunctionCandidate(Sema &S, OverloadCandidate *Cand, in NoteFunctionCandidate() argument
9688 FunctionDecl *Fn = Cand->Function; in NoteFunctionCandidate()
9691 if (Cand->Viable && (Fn->isDeleted() || in NoteFunctionCandidate()
9695 ClassifyOverloadCandidate(S, Cand->FoundDecl, Fn, FnDesc); in NoteFunctionCandidate()
9700 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in NoteFunctionCandidate()
9705 if (Cand->Viable) { in NoteFunctionCandidate()
9706 S.NoteOverloadCandidate(Cand->FoundDecl, Fn); in NoteFunctionCandidate()
9710 switch (Cand->FailureKind) { in NoteFunctionCandidate()
9713 return DiagnoseArityMismatch(S, Cand, NumArgs); in NoteFunctionCandidate()
9716 return DiagnoseBadDeduction(S, Cand, NumArgs, in NoteFunctionCandidate()
9722 MaybeEmitInheritedConstructorNote(S, Cand->FoundDecl); in NoteFunctionCandidate()
9729 return S.NoteOverloadCandidate(Cand->FoundDecl, Fn); in NoteFunctionCandidate()
9732 unsigned I = (Cand->IgnoreObjectArgument ? 1 : 0); in NoteFunctionCandidate()
9733 for (unsigned N = Cand->NumConversions; I != N; ++I) in NoteFunctionCandidate()
9734 if (Cand->Conversions[I].isBad()) in NoteFunctionCandidate()
9735 return DiagnoseBadConversion(S, Cand, I, TakingCandidateAddress); in NoteFunctionCandidate()
9740 return S.NoteOverloadCandidate(Cand->FoundDecl, Fn); in NoteFunctionCandidate()
9744 return DiagnoseBadTarget(S, Cand); in NoteFunctionCandidate()
9747 return DiagnoseFailedEnableIfAttr(S, Cand); in NoteFunctionCandidate()
9750 bool Available = checkAddressOfCandidateIsAvailable(S, Cand->Function); in NoteFunctionCandidate()
9758 static void NoteSurrogateCandidate(Sema &S, OverloadCandidate *Cand) { in NoteSurrogateCandidate() argument
9762 QualType FnType = Cand->Surrogate->getConversionType(); in NoteSurrogateCandidate()
9786 S.Diag(Cand->Surrogate->getLocation(), diag::note_ovl_surrogate_cand) in NoteSurrogateCandidate()
9792 OverloadCandidate *Cand) { in NoteBuiltinOperatorCandidate() argument
9793 assert(Cand->NumConversions <= 2 && "builtin operator is not binary"); in NoteBuiltinOperatorCandidate()
9797 TypeStr += Cand->BuiltinTypes.ParamTypes[0].getAsString(); in NoteBuiltinOperatorCandidate()
9798 if (Cand->NumConversions == 1) { in NoteBuiltinOperatorCandidate()
9803 TypeStr += Cand->BuiltinTypes.ParamTypes[1].getAsString(); in NoteBuiltinOperatorCandidate()
9810 OverloadCandidate *Cand) { in NoteAmbiguousUserConversions() argument
9811 unsigned NoOperands = Cand->NumConversions; in NoteAmbiguousUserConversions()
9813 const ImplicitConversionSequence &ICS = Cand->Conversions[ArgIdx]; in NoteAmbiguousUserConversions()
9822 static SourceLocation GetLocationForCandidate(const OverloadCandidate *Cand) { in GetLocationForCandidate() argument
9823 if (Cand->Function) in GetLocationForCandidate()
9824 return Cand->Function->getLocation(); in GetLocationForCandidate()
9825 if (Cand->IsSurrogate) in GetLocationForCandidate()
9826 return Cand->Surrogate->getLocation(); in GetLocationForCandidate()
9989 static void CompleteNonViableCandidate(Sema &S, OverloadCandidate *Cand, in CompleteNonViableCandidate() argument
9991 assert(!Cand->Viable); in CompleteNonViableCandidate()
9994 if (Cand->FailureKind != ovl_fail_bad_conversion) return; in CompleteNonViableCandidate()
9999 Cand->Fix.setConversionChecker(TryCopyInitialization); in CompleteNonViableCandidate()
10002 unsigned ConvIdx = (Cand->IgnoreObjectArgument ? 1 : 0); in CompleteNonViableCandidate()
10003 unsigned ConvCount = Cand->NumConversions; in CompleteNonViableCandidate()
10007 if (Cand->Conversions[ConvIdx - 1].isBad()) { in CompleteNonViableCandidate()
10008 Unfixable = !Cand->TryToFixBadConversion(ConvIdx - 1, S); in CompleteNonViableCandidate()
10016 assert(!Cand->Conversions[ConvIdx].isInitialized() && in CompleteNonViableCandidate()
10026 if (Cand->IsSurrogate) { in CompleteNonViableCandidate()
10028 = Cand->Surrogate->getConversionType().getNonReferenceType(); in CompleteNonViableCandidate()
10033 } else if (Cand->Function) { in CompleteNonViableCandidate()
10034 Proto = Cand->Function->getType()->getAs<FunctionProtoType>(); in CompleteNonViableCandidate()
10035 if (isa<CXXMethodDecl>(Cand->Function) && in CompleteNonViableCandidate()
10036 !isa<CXXConstructorDecl>(Cand->Function)) in CompleteNonViableCandidate()
10042 Cand->Conversions[ConvIdx] in CompleteNonViableCandidate()
10044 Cand->BuiltinTypes.ParamTypes[ConvIdx], in CompleteNonViableCandidate()
10056 Cand->Conversions[ConvIdx] = TryCopyInitialization( in CompleteNonViableCandidate()
10062 if (!Unfixable && Cand->Conversions[ConvIdx].isBad()) in CompleteNonViableCandidate()
10063 Unfixable = !Cand->TryToFixBadConversion(ConvIdx, S); in CompleteNonViableCandidate()
10066 Cand->Conversions[ConvIdx].setEllipsis(); in CompleteNonViableCandidate()
10082 for (iterator Cand = begin(), LastCand = end(); Cand != LastCand; ++Cand) { in NoteCandidates() local
10083 if (Cand->Viable) in NoteCandidates()
10084 Cands.push_back(Cand); in NoteCandidates()
10086 CompleteNonViableCandidate(S, Cand, Args); in NoteCandidates()
10087 if (Cand->Function || Cand->IsSurrogate) in NoteCandidates()
10088 Cands.push_back(Cand); in NoteCandidates()
10103 OverloadCandidate *Cand = *I; in NoteCandidates() local
10113 if (Cand->Function) in NoteCandidates()
10114 NoteFunctionCandidate(S, Cand, Args.size(), in NoteCandidates()
10116 else if (Cand->IsSurrogate) in NoteCandidates()
10117 NoteSurrogateCandidate(S, Cand); in NoteCandidates()
10119 assert(Cand->Viable && in NoteCandidates()
10128 NoteAmbiguousUserConversions(S, OpLoc, Cand); in NoteCandidates()
10133 NoteBuiltinOperatorCandidate(S, Opc, OpLoc, Cand); in NoteCandidates()
10142 GetLocationForCandidate(const TemplateSpecCandidate *Cand) { in GetLocationForCandidate() argument
10143 return Cand->Specialization ? Cand->Specialization->getLocation() in GetLocationForCandidate()
10211 for (iterator Cand = begin(), LastCand = end(); Cand != LastCand; ++Cand) { in NoteCandidates() local
10212 if (Cand->Specialization) in NoteCandidates()
10213 Cands.push_back(Cand); in NoteCandidates()
10228 TemplateSpecCandidate *Cand = *I; in NoteCandidates() local
10237 assert(Cand->Specialization && in NoteCandidates()
10239 Cand->NoteDeductionFailure(S, ForTakingAddress); in NoteCandidates()