Home | History | Annotate | Download | only in Sema

Lines Matching defs:Candidate

537 /// to the form used in overload-candidate information.
1054 // conversion function that is a candidate by 13.3.1.3 when
2917 // constructor. [...] For copy-initialization, the candidate
5189 /// candidate functions, using the given function call arguments. If
5246 // Add this candidate
5247 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size());
5248 Candidate.FoundDecl = FoundDecl;
5249 Candidate.Function = Function;
5250 Candidate.Viable = true;
5251 Candidate.IsSurrogate = false;
5252 Candidate.IgnoreObjectArgument = false;
5253 Candidate.ExplicitCallArguments = Args.size();
5257 // (C++ 13.3.2p2): A candidate function having fewer than m
5262 Candidate.Viable = false;
5263 Candidate.FailureKind = ovl_fail_too_many_arguments;
5267 // (C++ 13.3.2p2): A candidate function having more than m parameters
5275 Candidate.Viable = false;
5276 Candidate.FailureKind = ovl_fail_too_few_arguments;
5284 Candidate.Viable = false;
5285 Candidate.FailureKind = ovl_fail_bad_target;
5298 Candidate.Conversions[ArgIdx]
5305 if (Candidate.Conversions[ArgIdx].isBad()) {
5306 Candidate.Viable = false;
5307 Candidate.FailureKind = ovl_fail_bad_conversion;
5314 Candidate.Conversions[ArgIdx].setEllipsis();
5357 /// method) as a method candidate to the given overload set.
5387 /// of candidate functions, using the given function call arguments
5412 // Add this candidate
5413 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5414 Candidate.FoundDecl = FoundDecl;
5415 Candidate.Function = Method;
5416 Candidate.IsSurrogate = false;
5417 Candidate.IgnoreObjectArgument = false;
5418 Candidate.ExplicitCallArguments = Args.size();
5422 // (C++ 13.3.2p2): A candidate function having fewer than m
5426 Candidate.Viable = false;
5427 Candidate.FailureKind = ovl_fail_too_many_arguments;
5431 // (C++ 13.3.2p2): A candidate function having more than m parameters
5439 Candidate.Viable = false;
5440 Candidate.FailureKind = ovl_fail_too_few_arguments;
5444 Candidate.Viable = true;
5448 Candidate.IgnoreObjectArgument = true;
5452 Candidate.Conversions[0]
5455 if (Candidate.Conversions[0].isBad()) {
5456 Candidate.Viable = false;
5457 Candidate.FailureKind = ovl_fail_bad_conversion;
5471 Candidate.Conversions[ArgIdx + 1]
5477 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5478 Candidate.Viable = false;
5479 Candidate.FailureKind = ovl_fail_bad_conversion;
5486 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5491 /// \brief Add a C++ member function template as a candidate to the candidate
5508 // In each case where a candidate is a function template, candidate
5511 // candidate functions in the usual way.113) A given name can refer to one
5513 // functions. In such a case, the candidate functions generated from each
5514 // function template are combined with the set of non-template candidate
5521 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5522 Candidate.FoundDecl = FoundDecl;
5523 Candidate.Function = MethodTmpl->getTemplatedDecl();
5524 Candidate.Viable = false;
5525 Candidate.FailureKind = ovl_fail_bad_deduction;
5526 Candidate.IsSurrogate = false;
5527 Candidate.IgnoreObjectArgument = false;
5528 Candidate
5529 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5535 // deduction as a candidate.
5544 /// \brief Add a C++ function template specialization as a candidate
5545 /// in the candidate set, using template argument deduction to produce
5558 // In each case where a candidate is a function template, candidate
5561 // candidate functions in the usual way.113) A given name can refer to one
5563 // functions. In such a case, the candidate functions generated from each
5564 // function template are combined with the set of non-template candidate
5571 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5572 Candidate.FoundDecl = FoundDecl;
5573 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5574 Candidate.Viable = false;
5575 Candidate.FailureKind = ovl_fail_bad_deduction;
5576 Candidate.IsSurrogate = false;
5577 Candidate.IgnoreObjectArgument = false;
5578 Candidate.ExplicitCallArguments = Args.size();
5579 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5585 // deduction as a candidate.
5592 /// candidate in the candidate set (C++ [over.match.conv],
5612 // Add this candidate
5613 OverloadCandidate &Candidate = CandidateSet.addCandidate(1);
5614 Candidate.FoundDecl = FoundDecl;
5615 Candidate.Function = Conversion;
5616 Candidate.IsSurrogate = false;
5617 Candidate.IgnoreObjectArgument = false;
5618 Candidate.FinalConversion.setAsIdentityConversion();
5619 Candidate.FinalConversion.setFromType(ConvType);
5620 Candidate.FinalConversion.setAllToTypes(ToType);
5621 Candidate.Viable = true;
5622 Candidate.ExplicitCallArguments = 1;
5637 Candidate.Conversions[0]
5642 if (Candidate.Conversions[0].isBad()) {
5643 Candidate.Viable = false;
5644 Candidate.FailureKind = ovl_fail_bad_conversion;
5655 Candidate.Viable = false;
5656 Candidate.FailureKind = ovl_fail_trivial_conversion;
5677 Candidate.Viable = false;
5678 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5698 Candidate.FinalConversion = ICS.Standard;
5706 Candidate.Viable = false;
5707 Candidate.FailureKind = ovl_fail_final_conversion_not_exact;
5717 Candidate.Viable = false;
5718 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5723 Candidate.Viable = false;
5724 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5734 /// candidate to the overload set, using template argument deduction
5755 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5756 Candidate.FoundDecl = FoundDecl;
5757 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5758 Candidate.Viable = false;
5759 Candidate.FailureKind = ovl_fail_bad_deduction;
5760 Candidate.IsSurrogate = false;
5761 Candidate.IgnoreObjectArgument = false;
5762 Candidate.ExplicitCallArguments = 1;
5763 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5769 // template argument deduction as a candidate.
5775 /// AddSurrogateCandidate - Adds a "surrogate" candidate function that
5793 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5794 Candidate.FoundDecl = FoundDecl;
5795 Candidate.Function = 0;
5796 Candidate.Surrogate = Conversion;
5797 Candidate.Viable = true;
5798 Candidate.IsSurrogate = true;
5799 Candidate.IgnoreObjectArgument = false;
5800 Candidate.ExplicitCallArguments = Args.size();
5809 Candidate.Viable = false;
5810 Candidate.FailureKind = ovl_fail_bad_conversion;
5811 Candidate.Conversions[0] = ObjectInit;
5818 Candidate.Conversions[0].setUserDefined();
5819 Candidate.Conversions[0].UserDefined.Before = ObjectInit.Standard;
5820 Candidate.Conversions[0].UserDefined.EllipsisConversion = false;
5821 Candidate.Conversions[0].UserDefined.HadMultipleCandidates = false;
5822 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
5823 Candidate.Conversions[0].UserDefined.FoundConversionFunction = FoundDecl;
5824 Candidate.Conversions[0].UserDefined.After
5825 = Candidate.Conversions[0].UserDefined.Before;
5826 Candidate.Conversions[0].UserDefined.After.setAsIdentityConversion();
5831 // (C++ 13.3.2p2): A candidate function having fewer than m
5835 Candidate.Viable = false;
5836 Candidate.FailureKind = ovl_fail_too_many_arguments;
5844 Candidate.Viable = false;
5845 Candidate.FailureKind = ovl_fail_too_few_arguments;
5858 Candidate.Conversions[ArgIdx + 1]
5864 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5865 Candidate.Viable = false;
5866 Candidate.FailureKind = ovl_fail_bad_conversion;
5873 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5898 // three sets of candidate functions, designated member
5927 /// AddBuiltinCandidate - Add a candidate for a built-in
5929 /// of the built-in candidate, respectively. Args and NumArgs are the
5930 /// arguments being passed to the candidate. IsAssignmentOperator
5931 /// should be true when this built-in candidate is an assignment
5943 // Add this candidate
5944 OverloadCandidate &Candidate = CandidateSet.addCandidate(NumArgs);
5945 Candidate.FoundDecl = DeclAccessPair::make(0, AS_none);
5946 Candidate.Function = 0;
5947 Candidate.IsSurrogate = false;
5948 Candidate.IgnoreObjectArgument = false;
5949 Candidate.BuiltinTypes.ResultTy = ResultTy;
5951 Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
5955 Candidate.Viable = true;
5956 Candidate.ExplicitCallArguments = NumArgs;
5964 // parameter of a built-in candidate.
5973 Candidate.Conversions[ArgIdx]
5976 Candidate.Conversions[ArgIdx]
5983 if (Candidate.Conversions[ArgIdx].isBad()) {
5984 Candidate.Viable = false;
5985 Candidate.FailureKind = ovl_fail_bad_conversion;
5992 /// candidate operator functions for built-in operators (C++
6019 /// were present in the candidate set.
6023 /// candidate set.
6027 /// candidate type set.
6270 /// given type to the candidate set.
6355 /// operator overloads from the standard to a candidate set.
6357 // Common instance state available to all overload candidate addition methods.
6524 // is either volatile or empty, there exist candidate operator
6534 // candidate operator functions of the form
6554 // empty, there exist candidate operator functions of the form
6577 // exist candidate operator functions of the form
6583 // ref-qualifier, there exist candidate operator functions of the form
6605 // For every promoted arithmetic type T, there exist candidate
6631 // For every type T, there exist candidate operator functions of
6646 // For every promoted integral type T, there exist candidate
6671 // For every pointer to member type T, there exist candidate operator
6686 // Don't add the same builtin candidate twice.
6700 // std::nullptr_t, there exist candidate operator functions of the form
6710 // If there is a user-written candidate with the same name and parameter
6711 // types as a built-in candidate operator function, the built-in operator
6712 // function is hidden and is not included in the set of candidate
6760 // Don't add the same builtin candidate twice.
6774 // Don't add the same builtin candidate twice, or if a user defined
6775 // candidate exists.
6802 // there exist candidate operator functions of the form
6813 // exist candidate operator functions of the form
6856 // exist candidate operator functions of the form
6875 // candidate operator functions of the form
6926 // exist candidate operator functions of the form
6959 // empty, there exist candidate operator functions of the form
6994 // volatile or empty, there exist candidate operator functions
7003 // empty, there exist candidate operator functions of the form
7044 // Make sure we don't add the same candidate twice.
7073 // arithmetic type, there exist candidate operator functions of
7091 // Add this built-in operator as a candidate (VQ is empty).
7097 // Add this built-in operator as a candidate (VQ is 'volatile').
7120 // Add this built-in operator as a candidate (VQ is empty).
7125 // Add this built-in operator as a candidate (VQ is 'volatile').
7141 // type, there exist candidate operator functions of the form
7159 // Add this built-in operator as a candidate (VQ is empty).
7164 // Add this built-in operator as a candidate (VQ is 'volatile').
7177 // There also exist candidate operator functions of the form
7198 // exist candidate operator functions of the form
7241 // there exist candidate operator functions of the form
7295 // enumeration type, there exist candidate operator functions of the form
7348 /// operator overloads to the candidate set (C++ [over.built]), based
7360 // candidate types or either arithmetic or enumeral candidate types.
7385 // Exit early when no non-record types have been added to the candidate set
7540 /// candidate set (C++ [basic.lookup.argdep]).
7590 /// candidate is a better candidate than the second (C++ 13.3.3p1).
7619 assert(Cand2.NumConversions == NumArgs && "Overload candidate mismatch");
7706 /// within an overload candidate set.
7708 /// \param CandidateSet the set of candidate functions.
7714 /// function, Best points to the candidate function found.
7802 // This actually gets spelled 'candidate function' for now, but
7832 // Notes the location of an overload candidate.
7884 assert(Cand->Function && "for now, candidate must be a function");
8272 /// Generates a 'note' diagnostic for an overload candidate. We've
8276 /// pointed at the candidate declaration. Yes, this creates some
8282 /// It would be great to be able to express per-candidate problems
8566 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
8623 // Store the FixIt in the candidate if it exists.
8635 /// diagnostic messages containing the candidates in the candidate
8653 // Otherwise, this a non-viable builtin candidate. We do not, in general,
8654 // want to list every possible builtin candidate.
8670 // Set an arbitrary limit on the number of candidate functions we'll spam
8672 // candidate list.
9187 // Ideally we would note which candidate was chosen and why
9228 /// \brief Add a single candidate to the overload set.
9257 assert(!KnownValid && "unhandled case in overloaded call candidate");
9323 /// Returns true if a viable candidate was found and a diagnostic was issued.
9416 /// Returns true if a viable candidate was found and a diagnostic was issued.
9440 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9441 if (!candidate.getCorrectionDecl())
9442 return candidate.isKeyword();
9444 for (TypoCorrection::const_decl_iterator DI = candidate.begin(),
9445 DIEnd = candidate.end(); DI != DIEnd; ++DI) {
9485 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9592 // Add the functions denoted by the callee to the set of candidate
10605 // candidate functions includes at least the function call
10640 // is also considered as a candidate function. Similarly,
10641 // surrogate call functions are added to the set of candidate