Lines Matching defs:Cand2

10212 /// Cand1's set of enable_if attributes are said to be "better" than Cand2's iff
10214 /// Cand2's first N enable_if attributes (where N = the number of enable_if
10215 /// attributes on Cand2), and Cand1 has more than N enable_if attributes.
10218 /// attributes are worse than Cand2's, and Cand2's enable_if attributes are
10221 const FunctionDecl *Cand2) {
10224 bool Cand2Attr = Cand2->hasAttr<EnableIfAttr>();
10232 auto Cand2Attrs = Cand2->specific_attrs<EnableIfAttr>();
10239 // It's impossible for Cand1 to be better than (or equal to) Cand2 if Cand1
10240 // has fewer enable_if attributes than Cand2, and vice versa.
10260 const OverloadCandidate &Cand2) {
10261 if (!Cand1.Function || !Cand1.Function->isMultiVersion() || !Cand2.Function ||
10262 !Cand2.Function->isMultiVersion())
10268 if (Cand2.Function->isInvalidDecl())
10272 if (Cand2.Function->isInvalidDecl())
10278 bool Cand2CPUDisp = Cand2.Function->hasAttr<CPUDispatchAttr>();
10280 const auto *Cand2CPUSpec = Cand2.Function->getAttr<CPUSpecificAttr>();
10379 const OverloadCandidate &Cand2) {
10380 if (!Cand1.Function || !Cand2.Function)
10384 FunctionDecl *Fn2 = Cand2.Function;
10390 Fn1, Fn2, nullptr, Cand1.isReversed() ^ Cand2.isReversed()))
10414 Sema &S, const OverloadCandidate &Cand1, const OverloadCandidate &Cand2,
10418 if (!Cand2.Viable)
10431 // If Cand1 can be emitted and Cand2 cannot be emitted in the current
10432 // context, Cand1 is better than Cand2. If Cand1 can not be emitted and Cand2
10433 // can be emitted, Cand1 is not better than Cand2. This rule should have
10436 // If both Cand1 and Cand2 can be emitted, or neither can be emitted, then
10457 if (S.getLangOpts().CUDA && Cand1.Function && Cand2.Function &&
10464 SemaCUDA::isImplicitHostDeviceFunction(Cand2.Function);
10466 auto P2 = S.CUDA().IdentifyPreference(Caller, Cand2.Function);
10499 if (Cand1.IgnoreObjectArgument || Cand2.IgnoreObjectArgument)
10517 assert(Cand2.Conversions.size() == NumArgs && "Overload candidate mismatch");
10521 bool Cand2Bad = IsIllFormedConversion(Cand2.Conversions[ArgIdx]);
10540 Cand2.Conversions[ArgIdx])) {
10547 if (Cand1.Function && Cand2.Function &&
10548 Cand1.isReversed() != Cand2.isReversed() &&
10549 allowAmbiguity(S.Context, Cand1.Function, Cand2.Function)) {
10566 // Cand1 can't be better than Cand2.
10587 Cand1.Function && Cand2.Function &&
10589 isa<CXXConversionDecl>(Cand2.Function)) {
10595 compareConversionFunctions(S, Cand1.Function, Cand2.Function);
10599 Cand2.FinalConversion);
10616 Cand1.Function && Cand2.Function &&
10618 isa<CXXConstructorDecl>(Cand2.Function))
10622 Cand2.HasMatchedPackOnParmToNonPackOnArg)
10623 return Cand2.HasMatchedPackOnParmToNonPackOnArg;
10629 bool Cand2IsSpecialization = Cand2.Function &&
10630 Cand2.Function->getPrimaryTemplate();
10642 dyn_cast<CXXRecordDecl>(Cand2.FoundDecl->getDeclContext());
10645 Cand2.Function->getPrimaryTemplate(), Loc,
10653 Cand1.isReversed() ^ Cand2.isReversed())) {
10661 sameFunctionParameterTypeLists(S, Cand1, Cand2) &&
10662 S.getMoreConstrainedFunction(Cand1.Function, Cand2.Function) ==
10673 isa_and_nonnull<ConstructorUsingShadowDecl>(Cand2.FoundDecl.getDecl());
10679 auto *Cand2Class = cast<CXXRecordDecl>(Cand2.Function->getDeclContext());
10694 if (Cand1.RewriteKind != Cand2.RewriteKind)
10695 return Cand1.RewriteKind < Cand2.RewriteKind;
10700 auto *Guide2 = dyn_cast_or_null<CXXDeductionGuideDecl>(Cand2.Function);
10728 if (Cand1.Function && Cand2.Function) {
10729 Comparison Cmp = compareEnableIfAttrs(S, Cand1.Function, Cand2.Function);
10736 bool HasPS2 = Cand2.Function != nullptr &&
10737 functionHasPassObjectSizeParams(Cand2.Function);
10741 auto MV = isBetterMultiversionCandidate(Cand1, Cand2);
10749 if (S.getLangOpts().CUDA && Cand1.Function && Cand2.Function) {
10752 S.CUDA().IdentifyPreference(Caller, Cand2.Function);
10760 const auto *CD2 = dyn_cast_or_null<CXXConstructorDecl>(Cand2.Function);