Home | History | Annotate | Download | only in Sema

Lines Matching defs:Candidate

368 /// to the form used in overload-candidate information.
954 // conversion function that is a candidate by 13.3.1.3 when
2491 // constructor. [...] For copy-initialization, the candidate
4335 /// candidate functions, using the given function call arguments. If
4392 // Add this candidate
4394 OverloadCandidate& Candidate = CandidateSet.back();
4395 Candidate.FoundDecl = FoundDecl;
4396 Candidate.Function = Function;
4397 Candidate.Viable = true;
4398 Candidate.IsSurrogate = false;
4399 Candidate.IgnoreObjectArgument = false;
4400 Candidate.ExplicitCallArguments = NumArgs;
4404 // (C++ 13.3.2p2): A candidate function having fewer than m
4409 Candidate.Viable = false;
4410 Candidate.FailureKind = ovl_fail_too_many_arguments;
4414 // (C++ 13.3.2p2): A candidate function having more than m parameters
4422 Candidate.Viable = false;
4423 Candidate.FailureKind = ovl_fail_too_few_arguments;
4431 Candidate.Viable = false;
4432 Candidate.FailureKind = ovl_fail_bad_target;
4438 Candidate.Conversions.resize(NumArgs);
4446 Candidate.Conversions[ArgIdx]
4452 if (Candidate.Conversions[ArgIdx].isBad()) {
4453 Candidate.Viable = false;
4454 Candidate.FailureKind = ovl_fail_bad_conversion;
4461 Candidate.Conversions[ArgIdx].setEllipsis();
4506 /// method) as a method candidate to the given overload set.
4535 /// of candidate functions, using the given function call arguments
4560 // Add this candidate
4562 OverloadCandidate& Candidate = CandidateSet.back();
4563 Candidate.FoundDecl = FoundDecl;
4564 Candidate.Function = Method;
4565 Candidate.IsSurrogate = false;
4566 Candidate.IgnoreObjectArgument = false;
4567 Candidate.ExplicitCallArguments = NumArgs;
4571 // (C++ 13.3.2p2): A candidate function having fewer than m
4575 Candidate.Viable = false;
4576 Candidate.FailureKind = ovl_fail_too_many_arguments;
4580 // (C++ 13.3.2p2): A candidate function having more than m parameters
4588 Candidate.Viable = false;
4589 Candidate.FailureKind = ovl_fail_too_few_arguments;
4593 Candidate.Viable = true;
4594 Candidate.Conversions.resize(NumArgs + 1);
4598 Candidate.IgnoreObjectArgument = true;
4602 Candidate.Conversions[0]
4605 if (Candidate.Conversions[0].isBad()) {
4606 Candidate.Viable = false;
4607 Candidate.FailureKind = ovl_fail_bad_conversion;
4621 Candidate.Conversions[ArgIdx + 1]
4627 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
4628 Candidate.Viable = false;
4629 Candidate.FailureKind = ovl_fail_bad_conversion;
4636 Candidate.Conversions[ArgIdx + 1].setEllipsis();
4641 /// \brief Add a C++ member function template as a candidate to the candidate
4658 // In each case where a candidate is a function template, candidate
4661 // candidate functions in the usual way.113) A given name can refer to one
4663 // functions. In such a case, the candidate functions generated from each
4664 // function template are combined with the set of non-template candidate
4672 OverloadCandidate &Candidate = CandidateSet.back();
4673 Candidate.FoundDecl = FoundDecl;
4674 Candidate.Function = MethodTmpl->getTemplatedDecl();
4675 Candidate.Viable = false;
4676 Candidate.FailureKind = ovl_fail_bad_deduction;
4677 Candidate.IsSurrogate = false;
4678 Candidate.IgnoreObjectArgument = false;
4679 Candidate.ExplicitCallArguments = NumArgs;
4680 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
4686 // deduction as a candidate.
4695 /// \brief Add a C++ function template specialization as a candidate
4696 /// in the candidate set, using template argument deduction to produce
4709 // In each case where a candidate is a function template, candidate
4712 // candidate functions in the usual way.113) A given name can refer to one
4714 // functions. In such a case, the candidate functions generated from each
4715 // function template are combined with the set of non-template candidate
4723 OverloadCandidate &Candidate = CandidateSet.back();
4724 Candidate.FoundDecl = FoundDecl;
4725 Candidate.Function = FunctionTemplate->getTemplatedDecl();
4726 Candidate.Viable = false;
4727 Candidate.FailureKind = ovl_fail_bad_deduction;
4728 Candidate.IsSurrogate = false;
4729 Candidate.IgnoreObjectArgument = false;
4730 Candidate.ExplicitCallArguments = NumArgs;
4731 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
4737 // deduction as a candidate.
4744 /// candidate in the candidate set (C++ [over.match.conv],
4764 // Add this candidate
4766 OverloadCandidate& Candidate = CandidateSet.back();
4767 Candidate.FoundDecl = FoundDecl;
4768 Candidate.Function = Conversion;
4769 Candidate.IsSurrogate = false;
4770 Candidate.IgnoreObjectArgument = false;
4771 Candidate.FinalConversion.setAsIdentityConversion();
4772 Candidate.FinalConversion.setFromType(ConvType);
4773 Candidate.FinalConversion.setAllToTypes(ToType);
4774 Candidate.Viable = true;
4775 Candidate.Conversions.resize(1);
4776 Candidate.ExplicitCallArguments = 1;
4791 Candidate.Conversions[0]
4796 if (Candidate.Conversions[0].isBad()) {
4797 Candidate.Viable = false;
4798 Candidate.FailureKind = ovl_fail_bad_conversion;
4809 Candidate.Viable = false;
4810 Candidate.FailureKind = ovl_fail_trivial_conversion;
4831 Candidate.Viable = false;
4832 Candidate.FailureKind = ovl_fail_bad_final_conversion;
4852 Candidate.FinalConversion = ICS.Standard;
4860 Candidate.Viable = false;
4861 Candidate.FailureKind = ovl_fail_final_conversion_not_exact;
4871 Candidate.Viable = false;
4872 Candidate.FailureKind = ovl_fail_bad_final_conversion;
4877 Candidate.Viable = false;
4878 Candidate.FailureKind = ovl_fail_bad_final_conversion;
4888 /// candidate to the overload set, using template argument deduction
4910 OverloadCandidate &Candidate = CandidateSet.back();
4911 Candidate.FoundDecl = FoundDecl;
4912 Candidate.Function = FunctionTemplate->getTemplatedDecl();
4913 Candidate.Viable = false;
4914 Candidate.FailureKind = ovl_fail_bad_deduction;
4915 Candidate.IsSurrogate = false;
4916 Candidate.IgnoreObjectArgument = false;
4917 Candidate.ExplicitCallArguments = 1;
4918 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
4924 // template argument deduction as a candidate.
4930 /// AddSurrogateCandidate - Adds a "surrogate" candidate function that
4949 OverloadCandidate& Candidate = CandidateSet.back();
4950 Candidate.FoundDecl = FoundDecl;
4951 Candidate.Function = 0;
4952 Candidate.Surrogate = Conversion;
4953 Candidate.Viable = true;
4954 Candidate.IsSurrogate = true;
4955 Candidate.IgnoreObjectArgument = false;
4956 Candidate.Conversions.resize(NumArgs + 1);
4957 Candidate.ExplicitCallArguments = NumArgs;
4966 Candidate.Viable = false;
4967 Candidate.FailureKind = ovl_fail_bad_conversion;
4968 Candidate.Conversions[0] = ObjectInit;
4975 Candidate.Conversions[0].setUserDefined();
4976 Candidate.Conversions[0].UserDefined.Before = ObjectInit.Standard;
4977 Candidate.Conversions[0].UserDefined.EllipsisConversion = false;
4978 Candidate.Conversions[0].UserDefined.HadMultipleCandidates = false;
4979 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
4980 Candidate.Conversions[0].UserDefined.FoundConversionFunction = FoundDecl;
4981 Candidate.Conversions[0].UserDefined.After
4982 = Candidate.Conversions[0].UserDefined.Before;
4983 Candidate.Conversions[0].UserDefined.After.setAsIdentityConversion();
4988 // (C++ 13.3.2p2): A candidate function having fewer than m
4992 Candidate.Viable = false;
4993 Candidate.FailureKind = ovl_fail_too_many_arguments;
5001 Candidate.Viable = false;
5002 Candidate.FailureKind = ovl_fail_too_few_arguments;
5015 Candidate.Conversions[ArgIdx + 1]
5021 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5022 Candidate.Viable = false;
5023 Candidate.FailureKind = ovl_fail_bad_conversion;
5030 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5055 // three sets of candidate functions, designated member
5084 /// AddBuiltinCandidate - Add a candidate for a built-in
5086 /// of the built-in candidate, respectively. Args and NumArgs are the
5087 /// arguments being passed to the candidate
5088 /// should be true when this built-in candidate is an assignment
5100 // Add this candidate
5102 OverloadCandidate& Candidate = CandidateSet.back();
5103 Candidate.FoundDecl = DeclAccessPair::make(0, AS_none);
5104 Candidate.Function = 0;
5105 Candidate.IsSurrogate = false;
5106 Candidate.IgnoreObjectArgument = false;
5107 Candidate.BuiltinTypes.ResultTy = ResultTy;
5109 Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
5113 Candidate.Viable = true;
5114 Candidate.Conversions.resize(NumArgs);
5115 Candidate.ExplicitCallArguments = NumArgs;
5123 // parameter of a built-in candidate.
5132 Candidate.Conversions[ArgIdx]
5135 Candidate.Conversions[ArgIdx]
5142 if (Candidate.Conversions[ArgIdx].isBad()) {
5143 Candidate.Viable = false;
5144 Candidate.FailureKind = ovl_fail_bad_conversion;
5151 /// candidate operator functions for built-in operators (C++
5178 /// were present in the candidate set.
5182 /// candidate set.
5186 /// candidate type set.
5429 /// given type to the candidate set.
5514 /// operator overloads from the standard to a candidate set.
5516 // Common instance state available to all overload candidate addition methods.
5683 // is either volatile or empty, there exist candidate operator
5693 // candidate operator functions of the form
5713 // empty, there exist candidate operator functions of the form
5736 // exist candidate operator functions of the form
5742 // ref-qualifier, there exist candidate operator functions of the form
5764 // For every promoted arithmetic type T, there exist candidate
5790 // For every type T, there exist candidate operator functions of
5805 // For every promoted integral type T, there exist candidate
5830 // For every pointer to member type T, there exist candidate operator
5845 // Don't add the same builtin candidate twice.
5859 // std::nullptr_t, there exist candidate operator functions of the form
5869 // If there is a user-written candidate with the same name and parameter
5870 // types as a built-in candidate operator function, the built-in operator
5871 // function is hidden and is not included in the set of candidate
5919 // Don't add the same builtin candidate twice.
5933 // Don't add the same builtin candidate twice, or if a user defined
5934 // candidate exists.
5961 // there exist candidate operator functions of the form
5972 // exist candidate operator functions of the form
6015 // exist candidate operator functions of the form
6034 // candidate operator functions of the form
6085 // exist candidate operator functions of the form
6118 // empty, there exist candidate operator functions of the form
6153 // volatile or empty, there exist candidate operator functions
6162 // empty, there exist candidate operator functions of the form
6203 // Make sure we don't add the same candidate twice.
6232 // arithmetic type, there exist candidate operator functions of
6250 // Add this built-in operator as a candidate (VQ is empty).
6256 // Add this built-in operator as a candidate (VQ is 'volatile').
6279 // Add this built-in operator as a candidate (VQ is empty).
6284 // Add this built-in operator as a candidate (VQ is 'volatile').
6300 // type, there exist candidate operator functions of the form
6318 // Add this built-in operator as a candidate (VQ is empty).
6323 // Add this built-in operator as a candidate (VQ is 'volatile').
6336 // There also exist candidate operator functions of the form
6357 // exist candidate operator functions of the form
6400 // there exist candidate operator functions of the form
6454 // enumeration type, there exist candidate operator functions of the form
6507 /// operator overloads to the candidate set (C++ [over.built]), based
6519 // candidate types or either arithmetic or enumeral candidate types.
6544 // Exit early when no non-record types have been added to the candidate set
6699 /// candidate set (C++ [basic.lookup.argdep]).
6749 /// candidate is a better candidate than the second (C++ 13.3.3p1).
6778 assert(Cand2.Conversions.size() == NumArgs && "Overload candidate mismatch");
6856 /// within an overload candidate set.
6858 /// \param CandidateSet the set of candidate functions.
6864 /// function, Best points to the candidate function found.
6952 // This actually gets spelled 'candidate function' for now, but
6980 // Notes the location of an overload candidate.
7030 assert(Cand->Function && "for now, candidate must be a function");
7425 /// Generates a 'note' diagnostic for an overload candidate. We've
7429 /// pointed at the candidate declaration. Yes, this creates some
7435 /// It would be great to be able to express per-candidate problems
7718 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
7775 // Store the FixIt in the candidate if it exists.
7787 /// diagnostic messages containing the candidates in the candidate
7805 // Otherwise, this a non-viable builtin candidate. We do not, in general,
7806 // want to list every possible builtin candidate.
7822 // Set an arbitrary limit on the number of candidate functions we'll spam
7824 // candidate list.
8333 // Ideally we would note which candidate was chosen and why
8374 /// \brief Add a single candidate to the overload set.
8404 assert(!KnownValid && "unhandled case in overloaded call candidate");
8471 /// Returns true if a viable candidate was found and a diagnostic was issued.
8561 /// Returns true if a viable candidate was found and a diagnostic was issued.
8665 // Add the functions denoted by the callee to the set of candidate
9032 // out to a builtin candidate, we would do that same operation
9669 // candidate functions includes at least the function call
9704 // is also considered as a candidate function. Similarly,
9705 // surrogate call functions are added to the set of candidate