Home | History | Annotate | Download | only in Sema

Lines Matching refs:Candidate

556 /// to the form used in overload-candidate information.
1159 // conversion function that is a candidate by 13.3.1.3 when
3042 // constructor. [...] For copy-initialization, the candidate
5293 /// candidate functions, using the given function call arguments. If
5350 // Add this candidate
5351 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size());
5352 Candidate.FoundDecl = FoundDecl;
5353 Candidate.Function = Function;
5354 Candidate.Viable = true;
5355 Candidate.IsSurrogate = false;
5356 Candidate.IgnoreObjectArgument = false;
5357 Candidate.ExplicitCallArguments = Args.size();
5361 // (C++ 13.3.2p2): A candidate function having fewer than m
5366 Candidate.Viable = false;
5367 Candidate.FailureKind = ovl_fail_too_many_arguments;
5371 // (C++ 13.3.2p2): A candidate function having more than m parameters
5379 Candidate.Viable = false;
5380 Candidate.FailureKind = ovl_fail_too_few_arguments;
5388 Candidate.Viable = false;
5389 Candidate.FailureKind = ovl_fail_bad_target;
5402 Candidate.Conversions[ArgIdx]
5409 if (Candidate.Conversions[ArgIdx].isBad()) {
5410 Candidate.Viable = false;
5411 Candidate.FailureKind = ovl_fail_bad_conversion;
5418 Candidate.Conversions[ArgIdx].setEllipsis();
5461 /// method) as a method candidate to the given overload set.
5491 /// of candidate functions, using the given function call arguments
5516 // Add this candidate
5517 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5518 Candidate.FoundDecl = FoundDecl;
5519 Candidate.Function = Method;
5520 Candidate.IsSurrogate = false;
5521 Candidate.IgnoreObjectArgument = false;
5522 Candidate.ExplicitCallArguments = Args.size();
5526 // (C++ 13.3.2p2): A candidate function having fewer than m
5530 Candidate.Viable = false;
5531 Candidate.FailureKind = ovl_fail_too_many_arguments;
5535 // (C++ 13.3.2p2): A candidate function having more than m parameters
5543 Candidate.Viable = false;
5544 Candidate.FailureKind = ovl_fail_too_few_arguments;
5548 Candidate.Viable = true;
5552 Candidate.IgnoreObjectArgument = true;
5556 Candidate.Conversions[0]
5559 if (Candidate.Conversions[0].isBad()) {
5560 Candidate.Viable = false;
5561 Candidate.FailureKind = ovl_fail_bad_conversion;
5575 Candidate.Conversions[ArgIdx + 1]
5581 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5582 Candidate.Viable = false;
5583 Candidate.FailureKind = ovl_fail_bad_conversion;
5590 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5595 /// \brief Add a C++ member function template as a candidate to the candidate
5612 // In each case where a candidate is a function template, candidate
5615 // candidate functions in the usual way.113) A given name can refer to one
5617 // functions. In such a case, the candidate functions generated from each
5618 // function template are combined with the set of non-template candidate
5625 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5626 Candidate.FoundDecl = FoundDecl;
5627 Candidate.Function = MethodTmpl->getTemplatedDecl();
5628 Candidate.Viable = false;
5629 Candidate.FailureKind = ovl_fail_bad_deduction;
5630 Candidate.IsSurrogate = false;
5631 Candidate.IgnoreObjectArgument = false;
5632 Candidate.ExplicitCallArguments = Args.size();
5633 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5639 // deduction as a candidate.
5648 /// \brief Add a C++ function template specialization as a candidate
5649 /// in the candidate set, using template argument deduction to produce
5662 // In each case where a candidate is a function template, candidate
5665 // candidate functions in the usual way.113) A given name can refer to one
5667 // functions. In such a case, the candidate functions generated from each
5668 // function template are combined with the set of non-template candidate
5675 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5676 Candidate.FoundDecl = FoundDecl;
5677 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5678 Candidate.Viable = false;
5679 Candidate.FailureKind = ovl_fail_bad_deduction;
5680 Candidate.IsSurrogate = false;
5681 Candidate.IgnoreObjectArgument = false;
5682 Candidate.ExplicitCallArguments = Args.size();
5683 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5689 // deduction as a candidate.
5696 /// candidate in the candidate set (C++ [over.match.conv],
5716 // Add this candidate
5717 OverloadCandidate &Candidate = CandidateSet.addCandidate(1);
5718 Candidate.FoundDecl = FoundDecl;
5719 Candidate.Function = Conversion;
5720 Candidate.IsSurrogate = false;
5721 Candidate.IgnoreObjectArgument = false;
5722 Candidate.FinalConversion.setAsIdentityConversion();
5723 Candidate.FinalConversion.setFromType(ConvType);
5724 Candidate.FinalConversion.setAllToTypes(ToType);
5725 Candidate.Viable = true;
5726 Candidate.ExplicitCallArguments = 1;
5741 Candidate.Conversions[0]
5746 if (Candidate.Conversions[0].isBad()) {
5747 Candidate.Viable = false;
5748 Candidate.FailureKind = ovl_fail_bad_conversion;
5759 Candidate.Viable = false;
5760 Candidate.FailureKind = ovl_fail_trivial_conversion;
5781 Candidate.Viable = false;
5782 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5802 Candidate.FinalConversion = ICS.Standard;
5810 Candidate.Viable = false;
5811 Candidate.FailureKind = ovl_fail_final_conversion_not_exact;
5821 Candidate.Viable = false;
5822 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5827 Candidate.Viable = false;
5828 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5838 /// candidate to the overload set, using template argument deduction
5859 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5860 Candidate.FoundDecl = FoundDecl;
5861 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5862 Candidate.Viable = false;
5863 Candidate.FailureKind = ovl_fail_bad_deduction;
5864 Candidate.IsSurrogate = false;
5865 Candidate.IgnoreObjectArgument = false;
5866 Candidate.ExplicitCallArguments = 1;
5867 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5873 // template argument deduction as a candidate.
5879 /// AddSurrogateCandidate - Adds a "surrogate" candidate function that
5897 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5898 Candidate.FoundDecl = FoundDecl;
5899 Candidate.Function = 0;
5900 Candidate.Surrogate = Conversion;
5901 Candidate.Viable = true;
5902 Candidate.IsSurrogate = true;
5903 Candidate.IgnoreObjectArgument = false;
5904 Candidate.ExplicitCallArguments = Args.size();
5913 Candidate.Viable = false;
5914 Candidate.FailureKind = ovl_fail_bad_conversion;
5915 Candidate.Conversions[0] = ObjectInit;
5922 Candidate.Conversions[0].setUserDefined();
5923 Candidate.Conversions[0].UserDefined.Before = ObjectInit.Standard;
5924 Candidate.Conversions[0].UserDefined.EllipsisConversion = false;
5925 Candidate.Conversions[0].UserDefined.HadMultipleCandidates = false;
5926 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
5927 Candidate.Conversions[0].UserDefined.FoundConversionFunction = FoundDecl;
5928 Candidate.Conversions[0].UserDefined.After
5929 = Candidate.Conversions[0].UserDefined.Before;
5930 Candidate.Conversions[0].UserDefined.After.setAsIdentityConversion();
5935 // (C++ 13.3.2p2): A candidate function having fewer than m
5939 Candidate.Viable = false;
5940 Candidate.FailureKind = ovl_fail_too_many_arguments;
5948 Candidate.Viable = false;
5949 Candidate.FailureKind = ovl_fail_too_few_arguments;
5962 Candidate.Conversions[ArgIdx + 1]
5968 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5969 Candidate.Viable = false;
5970 Candidate.FailureKind = ovl_fail_bad_conversion;
5977 Candidate.Conversions[ArgIdx + 1].setEllipsis();
6002 // three sets of candidate functions, designated member
6031 /// AddBuiltinCandidate - Add a candidate for a built-in
6033 /// of the built-in candidate, respectively. Args and NumArgs are the
6034 /// arguments being passed to the candidate. IsAssignmentOperator
6035 /// should be true when this built-in candidate is an assignment
6047 // Add this candidate
6048 OverloadCandidate &Candidate = CandidateSet.addCandidate(NumArgs);
6049 Candidate.FoundDecl = DeclAccessPair::make(0, AS_none);
6050 Candidate.Function = 0;
6051 Candidate.IsSurrogate = false;
6052 Candidate.IgnoreObjectArgument = false;
6053 Candidate.BuiltinTypes.ResultTy = ResultTy;
6055 Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
6059 Candidate.Viable = true;
6060 Candidate.ExplicitCallArguments = NumArgs;
6068 // parameter of a built-in candidate.
6077 Candidate.Conversions[ArgIdx]
6080 Candidate.Conversions[ArgIdx]
6087 if (Candidate.Conversions[ArgIdx].isBad()) {
6088 Candidate.Viable = false;
6089 Candidate.FailureKind = ovl_fail_bad_conversion;
6096 /// candidate operator functions for built-in operators (C++
6123 /// were present in the candidate set.
6127 /// candidate set.
6131 /// candidate type set.
6384 /// given type to the candidate set.
6470 /// operator overloads from the standard to a candidate set.
6472 // Common instance state available to all overload candidate addition methods.
6616 // and our candidate type is a non-restrict-qualified pointer.
6673 // is either volatile or empty, there exist candidate operator
6683 // candidate operator functions of the form
6704 // empty, there exist candidate operator functions of the form
6729 // exist candidate operator functions of the form
6735 // ref-qualifier, there exist candidate operator functions of the form
6757 // For every promoted arithmetic type T, there exist candidate
6783 // For every type T, there exist candidate operator functions of
6798 // For every promoted integral type T, there exist candidate
6823 // For every pointer to member type T, there exist candidate operator
6838 // Don't add the same builtin candidate twice.
6852 // std::nullptr_t, there exist candidate operator functions of the form
6862 // [...]the built-in candidates include all of the candidate operator
6865 // candidate.
6914 // Don't add the same builtin candidate twice.
6928 // Don't add the same builtin candidate twice, or if a user defined
6929 // candidate exists.
6956 // there exist candidate operator functions of the form
6967 // exist candidate operator functions of the form
7010 // exist candidate operator functions of the form
7029 // candidate operator functions of the form
7080 // exist candidate operator functions of the form
7113 // empty, there exist candidate operator functions of the form
7148 // volatile or empty, there exist candidate operator functions
7157 // empty, there exist candidate operator functions of the form
7220 // Make sure we don't add the same candidate twice.
7271 // arithmetic type, there exist candidate operator functions of
7289 // Add this built-in operator as a candidate (VQ is empty).
7295 // Add this built-in operator as a candidate (VQ is 'volatile').
7318 // Add this built-in operator as a candidate (VQ is empty).
7323 // Add this built-in operator as a candidate (VQ is 'volatile').
7339 // type, there exist candidate operator functions of the form
7357 // Add this built-in operator as a candidate (VQ is empty).
7362 // Add this built-in operator as a candidate (VQ is 'volatile').
7375 // There also exist candidate operator functions of the form
7396 // exist candidate operator functions of the form
7439 // there exist candidate operator functions of the form
7493 // enumeration type, there exist candidate operator functions of the form
7546 /// operator overloads to the candidate set (C++ [over.built]), based
7558 // candidate types or either arithmetic or enumeral candidate types.
7583 // Exit early when no non-record types have been added to the candidate set
7738 /// candidate set (C++ [basic.lookup.argdep]).
7786 /// candidate is a better candidate than the second (C++ 13.3.3p1).
7815 assert(Cand2.NumConversions == NumArgs && "Overload candidate mismatch");
7902 /// within an overload candidate set.
7908 /// function, \p Best points to the candidate function found.
7996 // This actually gets spelled 'candidate function' for now, but
8026 // Notes the location of an overload candidate.
8088 assert(Cand->Function && "for now, candidate must be a function");
8463 // If this candidate was disabled by enable_if, say so.
8531 /// Generates a 'note' diagnostic for an overload candidate. We've
8535 /// pointed at the candidate declaration. Yes, this creates some
8541 /// It would be great to be able to express per-candidate problems
8827 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
8884 // Store the FixIt in the candidate if it exists.
8896 /// diagnostic messages containing the candidates in the candidate
8914 // Otherwise, this a non-viable builtin candidate. We do not, in general,
8915 // want to list every possible builtin candidate.
8930 // Set an arbitrary limit on the number of candidate functions we'll spam
8932 // candidate list.
9446 // Ideally we would note which candidate was chosen and why
9487 /// \brief Add a single candidate to the overload set.
9516 assert(!KnownValid && "unhandled case in overloaded call candidate");
9581 /// Returns true if a viable candidate was found and a diagnostic was issued.
9679 /// Returns true if a viable candidate was found and a diagnostic was issued.
9703 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9704 if (!candidate.getCorrectionDecl())
9705 return candidate.isKeyword();
9707 for (TypoCorrection::const_decl_iterator DI = candidate.begin(),
9708 DIEnd = candidate.end(); DI != DIEnd; ++DI) {
9748 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9871 // Add the functions denoted by the callee to the set of candidate
10930 // candidate functions includes at least the function call
10964 // is also considered as a candidate function. Similarly,
10965 // surrogate call functions are added to the set of candidate