Lines Matching defs:Cand1
10031 /// Cand1's set of enable_if attributes are said to be "better" than Cand2's iff
10032 /// Cand1's first N enable_if attributes have precisely the same conditions as
10034 /// attributes on Cand2), and Cand1 has more than N enable_if attributes.
10036 /// Note that you can have a pair of candidates such that Cand1's enable_if
10038 /// worse than Cand1's.
10039 static Comparison compareEnableIfAttrs(const Sema &S, const FunctionDecl *Cand1,
10042 bool Cand1Attr = Cand1->hasAttr<EnableIfAttr>();
10050 auto Cand1Attrs = Cand1->specific_attrs<EnableIfAttr>();
10058 // It's impossible for Cand1 to be better than (or equal to) Cand2 if Cand1
10078 isBetterMultiversionCandidate(const OverloadCandidate &Cand1,
10080 if (!Cand1.Function || !Cand1.Function->isMultiVersion() || !Cand2.Function ||
10086 if (Cand1.Function->isInvalidDecl()) {
10096 bool Cand1CPUDisp = Cand1.Function->hasAttr<CPUDispatchAttr>();
10098 const auto *Cand1CPUSpec = Cand1.Function->getAttr<CPUSpecificAttr>();
10197 const OverloadCandidate &Cand1,
10199 if (!Cand1.Function || !Cand2.Function)
10202 FunctionDecl *Fn1 = Cand1.Function;
10209 Fn1, Fn2, nullptr, Cand1.isReversed() ^ Cand2.isReversed()))
10233 Sema &S, const OverloadCandidate &Cand1, const OverloadCandidate &Cand2,
10238 return Cand1.Viable;
10239 else if (!Cand1.Viable)
10250 // If Cand1 can be emitted and Cand2 cannot be emitted in the current
10251 // context, Cand1 is better than Cand2. If Cand1 can not be emitted and Cand2
10252 // can be emitted, Cand1 is not better than Cand2. This rule should have
10255 // If both Cand1 and Cand2 can be emitted, or neither can be emitted, then
10276 if (S.getLangOpts().CUDA && Cand1.Function && Cand2.Function &&
10281 SemaCUDA::isImplicitHostDeviceFunction(Cand1.Function);
10284 auto P1 = S.CUDA().IdentifyPreference(Caller, Cand1.Function);
10318 if (Cand1.IgnoreObjectArgument || Cand2.IgnoreObjectArgument)
10335 unsigned NumArgs = Cand1.Conversions.size();
10339 bool Cand1Bad = IsIllFormedConversion(Cand1.Conversions[ArgIdx]);
10358 Cand1.Conversions[ArgIdx],
10361 // Cand1 has a better conversion sequence.
10366 if (Cand1.Function && Cand2.Function &&
10367 Cand1.isReversed() != Cand2.isReversed() &&
10368 allowAmbiguity(S.Context, Cand1.Function, Cand2.Function)) {
10385 // Cand1 can't be better than Cand2.
10406 Cand1.Function && Cand2.Function &&
10407 isa<CXXConversionDecl>(Cand1.Function) &&
10414 compareConversionFunctions(S, Cand1.Function, Cand2.Function);
10417 Cand1.FinalConversion,
10435 Cand1.Function && Cand2.Function &&
10436 isa<CXXConstructorDecl>(Cand1.Function) !=
10438 return isa<CXXConstructorDecl>(Cand1.Function);
10442 bool Cand1IsSpecialization = Cand1.Function &&
10443 Cand1.Function->getPrimaryTemplate();
10455 dyn_cast<CXXRecordDecl>(Cand1.FoundDecl->getDeclContext());
10459 Cand1.Function->getPrimaryTemplate(),
10461 isa<CXXConversionDecl>(Cand1.Function) ? TPOC_Conversion
10463 Cand1.ExplicitCallArguments,
10468 Cand1.isReversed() ^ Cand2.isReversed())) {
10469 return BetterTemplate == Cand1.Function->getPrimaryTemplate();
10476 sameFunctionParameterTypeLists(S, Cand1, Cand2) &&
10477 S.getMoreConstrainedFunction(Cand1.Function, Cand2.Function) ==
10478 Cand1.Function)
10486 isa_and_nonnull<ConstructorUsingShadowDecl>(Cand1.FoundDecl.getDecl());
10493 auto *Cand1Class = cast<CXXRecordDecl>(Cand1.Function->getDeclContext());
10509 if (Cand1.RewriteKind != Cand2.RewriteKind)
10510 return Cand1.RewriteKind < Cand2.RewriteKind;
10514 auto *Guide1 = dyn_cast_or_null<CXXDeductionGuideDecl>(Cand1.Function);
10543 if (Cand1.Function && Cand2.Function) {
10544 Comparison Cmp = compareEnableIfAttrs(S, Cand1.Function, Cand2.Function);
10549 bool HasPS1 = Cand1.Function != nullptr &&
10550 functionHasPassObjectSizeParams(Cand1.Function);
10556 auto MV = isBetterMultiversionCandidate(Cand1, Cand2);
10564 if (S.getLangOpts().CUDA && Cand1.Function && Cand2.Function) {
10566 return S.CUDA().IdentifyPreference(Caller, Cand1.Function) >
10574 const auto *CD1 = dyn_cast_or_null<CXXConstructorDecl>(Cand1.Function);