Home | History | Annotate | Download | only in Sema

Lines Matching defs:Candidate

565 /// to the form used in overload-candidate information.
1145 // conversion function that is a candidate by 13.3.1.3 when
2995 // constructor. [...] For copy-initialization, the candidate
5343 // First, build a candidate set from the previously recorded
5349 // Then, perform overload resolution over the candidate set.
5403 /// candidate functions, using the given function call arguments. If
5460 // Add this candidate
5461 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size());
5462 Candidate.FoundDecl = FoundDecl;
5463 Candidate.Function = Function;
5464 Candidate.Viable = true;
5465 Candidate.IsSurrogate = false;
5466 Candidate.IgnoreObjectArgument = false;
5467 Candidate.ExplicitCallArguments = Args.size();
5471 // (C++ 13.3.2p2): A candidate function having fewer than m
5476 Candidate.Viable = false;
5477 Candidate.FailureKind = ovl_fail_too_many_arguments;
5481 // (C++ 13.3.2p2): A candidate function having more than m parameters
5489 Candidate.Viable = false;
5490 Candidate.FailureKind = ovl_fail_too_few_arguments;
5498 Candidate.Viable = false;
5499 Candidate.FailureKind = ovl_fail_bad_target;
5512 Candidate.Conversions[ArgIdx]
5519 if (Candidate.Conversions[ArgIdx].isBad()) {
5520 Candidate.Viable = false;
5521 Candidate.FailureKind = ovl_fail_bad_conversion;
5528 Candidate.Conversions[ArgIdx].setEllipsis();
5571 /// method) as a method candidate to the given overload set.
5601 /// of candidate functions, using the given function call arguments
5626 // Add this candidate
5627 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5628 Candidate.FoundDecl = FoundDecl;
5629 Candidate.Function = Method;
5630 Candidate.IsSurrogate = false;
5631 Candidate.IgnoreObjectArgument = false;
5632 Candidate.ExplicitCallArguments = Args.size();
5636 // (C++ 13.3.2p2): A candidate function having fewer than m
5640 Candidate.Viable = false;
5641 Candidate.FailureKind = ovl_fail_too_many_arguments;
5645 // (C++ 13.3.2p2): A candidate function having more than m parameters
5653 Candidate.Viable = false;
5654 Candidate.FailureKind = ovl_fail_too_few_arguments;
5658 Candidate.Viable = true;
5662 Candidate.IgnoreObjectArgument = true;
5666 Candidate.Conversions[0]
5669 if (Candidate.Conversions[0].isBad()) {
5670 Candidate.Viable = false;
5671 Candidate.FailureKind = ovl_fail_bad_conversion;
5685 Candidate.Conversions[ArgIdx + 1]
5691 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5692 Candidate.Viable = false;
5693 Candidate.FailureKind = ovl_fail_bad_conversion;
5700 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5705 /// \brief Add a C++ member function template as a candidate to the candidate
5722 // In each case where a candidate is a function template, candidate
5725 // candidate functions in the usual way.113) A given name can refer to one
5727 // functions. In such a case, the candidate functions generated from each
5728 // function template are combined with the set of non-template candidate
5735 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5736 Candidate.FoundDecl = FoundDecl;
5737 Candidate.Function = MethodTmpl->getTemplatedDecl();
5738 Candidate.Viable = false;
5739 Candidate.FailureKind = ovl_fail_bad_deduction;
5740 Candidate.IsSurrogate = false;
5741 Candidate.IgnoreObjectArgument = false;
5742 Candidate.ExplicitCallArguments = Args.size();
5743 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5749 // deduction as a candidate.
5758 /// \brief Add a C++ function template specialization as a candidate
5759 /// in the candidate set, using template argument deduction to produce
5772 // In each case where a candidate is a function template, candidate
5775 // candidate functions in the usual way.113) A given name can refer to one
5777 // functions. In such a case, the candidate functions generated from each
5778 // function template are combined with the set of non-template candidate
5785 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5786 Candidate.FoundDecl = FoundDecl;
5787 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5788 Candidate.Viable = false;
5789 Candidate.FailureKind = ovl_fail_bad_deduction;
5790 Candidate.IsSurrogate = false;
5791 Candidate.IgnoreObjectArgument = false;
5792 Candidate.ExplicitCallArguments = Args.size();
5793 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5799 // deduction as a candidate.
5806 /// candidate in the candidate set (C++ [over.match.conv],
5834 // Add this candidate
5835 OverloadCandidate &Candidate = CandidateSet.addCandidate(1);
5836 Candidate.FoundDecl = FoundDecl;
5837 Candidate.Function = Conversion;
5838 Candidate.IsSurrogate = false;
5839 Candidate.IgnoreObjectArgument = false;
5840 Candidate.FinalConversion.setAsIdentityConversion();
5841 Candidate.FinalConversion.setFromType(ConvType);
5842 Candidate.FinalConversion.setAllToTypes(ToType);
5843 Candidate.Viable = true;
5844 Candidate.ExplicitCallArguments = 1;
5859 Candidate.Conversions[0]
5864 if (Candidate.Conversions[0].isBad()) {
5865 Candidate.Viable = false;
5866 Candidate.FailureKind = ovl_fail_bad_conversion;
5877 Candidate.Viable = false;
5878 Candidate.FailureKind = ovl_fail_trivial_conversion;
5899 Candidate.Viable = false;
5900 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5920 Candidate.FinalConversion = ICS.Standard;
5928 Candidate.Viable = false;
5929 Candidate.FailureKind = ovl_fail_final_conversion_not_exact;
5939 Candidate.Viable = false;
5940 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5945 Candidate.Viable = false;
5946 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5956 /// candidate to the overload set, using template argument deduction
5977 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5978 Candidate.FoundDecl = FoundDecl;
5979 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5980 Candidate.Viable = false;
5981 Candidate.FailureKind = ovl_fail_bad_deduction;
5982 Candidate.IsSurrogate = false;
5983 Candidate.IgnoreObjectArgument = false;
5984 Candidate.ExplicitCallArguments = 1;
5985 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5991 // template argument deduction as a candidate.
5997 /// AddSurrogateCandidate - Adds a "surrogate" candidate function that
6015 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
6016 Candidate.FoundDecl = FoundDecl;
6017 Candidate.Function = 0;
6018 Candidate.Surrogate = Conversion;
6019 Candidate.Viable = true;
6020 Candidate.IsSurrogate = true;
6021 Candidate.IgnoreObjectArgument = false;
6022 Candidate.ExplicitCallArguments = Args.size();
6031 Candidate.Viable = false;
6032 Candidate.FailureKind = ovl_fail_bad_conversion;
6033 Candidate.Conversions[0] = ObjectInit;
6040 Candidate.Conversions[0].setUserDefined();
6041 Candidate.Conversions[0].UserDefined.Before = ObjectInit.Standard;
6042 Candidate.Conversions[0].UserDefined.EllipsisConversion = false;
6043 Candidate.Conversions[0].UserDefined.HadMultipleCandidates = false;
6044 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
6045 Candidate.Conversions[0].UserDefined.FoundConversionFunction = FoundDecl;
6046 Candidate.Conversions[0].UserDefined.After
6047 = Candidate.Conversions[0].UserDefined.Before;
6048 Candidate.Conversions[0].UserDefined.After.setAsIdentityConversion();
6053 // (C++ 13.3.2p2): A candidate function having fewer than m
6057 Candidate.Viable = false;
6058 Candidate.FailureKind = ovl_fail_too_many_arguments;
6066 Candidate.Viable = false;
6067 Candidate.FailureKind = ovl_fail_too_few_arguments;
6080 Candidate.Conversions[ArgIdx + 1]
6086 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
6087 Candidate.Viable = false;
6088 Candidate.FailureKind = ovl_fail_bad_conversion;
6095 Candidate.Conversions[ArgIdx + 1].setEllipsis();
6120 // three sets of candidate functions, designated member
6152 /// AddBuiltinCandidate - Add a candidate for a built-in
6154 /// of the built-in candidate, respectively. Args and NumArgs are the
6155 /// arguments being passed to the candidate. IsAssignmentOperator
6156 /// should be true when this built-in candidate is an assignment
6168 // Add this candidate
6169 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size());
6170 Candidate.FoundDecl = DeclAccessPair::make(0, AS_none);
6171 Candidate.Function = 0;
6172 Candidate.IsSurrogate = false;
6173 Candidate.IgnoreObjectArgument = false;
6174 Candidate.BuiltinTypes.ResultTy = ResultTy;
6176 Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
6180 Candidate.Viable = true;
6181 Candidate.ExplicitCallArguments = Args.size();
6189 // parameter of a built-in candidate.
6198 Candidate.Conversions[ArgIdx]
6201 Candidate.Conversions[ArgIdx]
6208 if (Candidate.Conversions[ArgIdx].isBad()) {
6209 Candidate.Viable = false;
6210 Candidate.FailureKind = ovl_fail_bad_conversion;
6219 /// candidate operator functions for built-in operators (C++
6246 /// were present in the candidate set.
6250 /// candidate set.
6254 /// candidate type set.
6509 /// given type to the candidate set.
6594 /// operator overloads from the standard to a candidate set.
6596 // Common instance state available to all overload candidate addition methods.
6739 // and our candidate type is a non-restrict-qualified pointer.
6795 // is either volatile or empty, there exist candidate operator
6805 // candidate operator functions of the form
6826 // empty, there exist candidate operator functions of the form
6851 // exist candidate operator functions of the form
6857 // ref-qualifier, there exist candidate operator functions of the form
6879 // For every promoted arithmetic type T, there exist candidate
6905 // For every type T, there exist candidate operator functions of
6920 // For every promoted integral type T, there exist candidate
6945 // For every pointer to member type T, there exist candidate operator
6960 // Don't add the same builtin candidate twice.
6973 // std::nullptr_t, there exist candidate operator functions of the form
6983 // [...]the built-in candidates include all of the candidate operator
6986 // candidate.
7035 // Don't add the same builtin candidate twice.
7048 // Don't add the same builtin candidate twice, or if a user defined
7049 // candidate exists.
7075 // there exist candidate operator functions of the form
7086 // exist candidate operator functions of the form
7128 // exist candidate operator functions of the form
7147 // candidate operator functions of the form
7198 // exist candidate operator functions of the form
7231 // empty, there exist candidate operator functions of the form
7264 // volatile or empty, there exist candidate operator functions
7273 // empty, there exist candidate operator functions of the form
7335 // Make sure we don't add the same candidate twice.
7385 // arithmetic type, there exist candidate operator functions of
7403 // Add this built-in operator as a candidate (VQ is empty).
7409 // Add this built-in operator as a candidate (VQ is 'volatile').
7431 // Add this built-in operator as a candidate (VQ is empty).
7436 // Add this built-in operator as a candidate (VQ is 'volatile').
7451 // type, there exist candidate operator functions of the form
7469 // Add this built-in operator as a candidate (VQ is empty).
7474 // Add this built-in operator as a candidate (VQ is 'volatile').
7486 // There also exist candidate operator functions of the form
7507 // exist candidate operator functions of the form
7550 // there exist candidate operator functions of the form
7604 // enumeration type, there exist candidate operator functions of the form
7657 /// operator overloads to the candidate set (C++ [over.built]), based
7669 // candidate types or either arithmetic or enumeral candidate types.
7694 // Exit early when no non-record types have been added to the candidate set
7849 /// candidate set (C++ [basic.lookup.argdep]).
7897 /// candidate is a better candidate than the second (C++ 13.3.3p1).
7926 assert(Cand2.NumConversions == NumArgs && "Overload candidate mismatch");
8013 /// within an overload candidate set.
8019 /// function, \p Best points to the candidate function found.
8107 // This actually gets spelled 'candidate function' for now, but
8137 // Notes the location of an overload candidate.
8199 assert(Cand->Function && "for now, candidate must be a function");
8413 /// over a candidate in any candidate set.
8441 /// General arity mismatch diagnosis over a candidate in a candidate set.
8485 /// Arity mismatch diagnosis specific to a function overload candidate.
8611 // If this candidate was disabled by enable_if, say so.
8713 /// Generates a 'note' diagnostic for an overload candidate. We've
8717 /// pointed at the candidate declaration. Yes, this creates some
8723 /// It would be great to be able to express per-candidate problems
9008 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
9065 // Store the FixIt in the candidate if it exists.
9077 /// diagnostic messages containing the candidates in the candidate
9095 // Otherwise, this a non-viable builtin candidate. We do not, in general,
9096 // want to list every possible builtin candidate.
9111 // Set an arbitrary limit on the number of candidate functions we'll spam
9113 // candidate list.
9204 /// the candidate set.
9208 // Sort the candidates by position (assuming no candidate is a match).
9216 // Otherwise, this is a non matching builtin candidate. We do not,
9217 // in general, want to list every possible builtin candidate.
9234 // candidate list.
9425 // If any candidate has a placeholder return type, trigger its deduction
9771 // Ideally we would note which candidate was chosen and why
9812 /// \brief Add a single candidate to the overload set.
9841 assert(!KnownValid && "unhandled case in overloaded call candidate");
9919 /// Returns true if a viable candidate was found and a diagnostic was issued.
10019 /// Returns true if a viable candidate was found and a diagnostic was issued.
10151 // Add the functions denoted by the callee to the set of candidate
11206 // candidate functions includes at least the function call
11241 // is also considered as a candidate function. Similarly,
11242 // surrogate call functions are added to the set of candidate