Home | History | Annotate | Download | only in Sema

Lines Matching defs:Candidate

547 /// to the form used in overload-candidate information.
1085 // conversion function that is a candidate by 13.3.1.3 when
2952 // constructor. [...] For copy-initialization, the candidate
5207 /// candidate functions, using the given function call arguments. If
5264 // Add this candidate
5265 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size());
5266 Candidate.FoundDecl = FoundDecl;
5267 Candidate.Function = Function;
5268 Candidate.Viable = true;
5269 Candidate.IsSurrogate = false;
5270 Candidate.IgnoreObjectArgument = false;
5271 Candidate.ExplicitCallArguments = Args.size();
5275 // (C++ 13.3.2p2): A candidate function having fewer than m
5280 Candidate.Viable = false;
5281 Candidate.FailureKind = ovl_fail_too_many_arguments;
5285 // (C++ 13.3.2p2): A candidate function having more than m parameters
5293 Candidate.Viable = false;
5294 Candidate.FailureKind = ovl_fail_too_few_arguments;
5302 Candidate.Viable = false;
5303 Candidate.FailureKind = ovl_fail_bad_target;
5316 Candidate.Conversions[ArgIdx]
5323 if (Candidate.Conversions[ArgIdx].isBad()) {
5324 Candidate.Viable = false;
5325 Candidate.FailureKind = ovl_fail_bad_conversion;
5332 Candidate.Conversions[ArgIdx].setEllipsis();
5375 /// method) as a method candidate to the given overload set.
5405 /// of candidate functions, using the given function call arguments
5430 // Add this candidate
5431 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5432 Candidate.FoundDecl = FoundDecl;
5433 Candidate.Function = Method;
5434 Candidate.IsSurrogate = false;
5435 Candidate.IgnoreObjectArgument = false;
5436 Candidate.ExplicitCallArguments = Args.size();
5440 // (C++ 13.3.2p2): A candidate function having fewer than m
5444 Candidate.Viable = false;
5445 Candidate.FailureKind = ovl_fail_too_many_arguments;
5449 // (C++ 13.3.2p2): A candidate function having more than m parameters
5457 Candidate.Viable = false;
5458 Candidate.FailureKind = ovl_fail_too_few_arguments;
5462 Candidate.Viable = true;
5466 Candidate.IgnoreObjectArgument = true;
5470 Candidate.Conversions[0]
5473 if (Candidate.Conversions[0].isBad()) {
5474 Candidate.Viable = false;
5475 Candidate.FailureKind = ovl_fail_bad_conversion;
5489 Candidate.Conversions[ArgIdx + 1]
5495 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5496 Candidate.Viable = false;
5497 Candidate.FailureKind = ovl_fail_bad_conversion;
5504 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5509 /// \brief Add a C++ member function template as a candidate to the candidate
5526 // In each case where a candidate is a function template, candidate
5529 // candidate functions in the usual way.113) A given name can refer to one
5531 // functions. In such a case, the candidate functions generated from each
5532 // function template are combined with the set of non-template candidate
5539 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5540 Candidate.FoundDecl = FoundDecl;
5541 Candidate.Function = MethodTmpl->getTemplatedDecl();
5542 Candidate.Viable = false;
5543 Candidate.FailureKind = ovl_fail_bad_deduction;
5544 Candidate.IsSurrogate = false;
5545 Candidate.IgnoreObjectArgument = false;
5546 Candidate.ExplicitCallArguments = Args.size();
5547 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5553 // deduction as a candidate.
5562 /// \brief Add a C++ function template specialization as a candidate
5563 /// in the candidate set, using template argument deduction to produce
5576 // In each case where a candidate is a function template, candidate
5579 // candidate functions in the usual way.113) A given name can refer to one
5581 // functions. In such a case, the candidate functions generated from each
5582 // function template are combined with the set of non-template candidate
5589 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5590 Candidate.FoundDecl = FoundDecl;
5591 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5592 Candidate.Viable = false;
5593 Candidate.FailureKind = ovl_fail_bad_deduction;
5594 Candidate.IsSurrogate = false;
5595 Candidate.IgnoreObjectArgument = false;
5596 Candidate.ExplicitCallArguments = Args.size();
5597 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5603 // deduction as a candidate.
5610 /// candidate in the candidate set (C++ [over.match.conv],
5630 // Add this candidate
5631 OverloadCandidate &Candidate = CandidateSet.addCandidate(1);
5632 Candidate.FoundDecl = FoundDecl;
5633 Candidate.Function = Conversion;
5634 Candidate.IsSurrogate = false;
5635 Candidate.IgnoreObjectArgument = false;
5636 Candidate.FinalConversion.setAsIdentityConversion();
5637 Candidate.FinalConversion.setFromType(ConvType);
5638 Candidate.FinalConversion.setAllToTypes(ToType);
5639 Candidate.Viable = true;
5640 Candidate.ExplicitCallArguments = 1;
5655 Candidate.Conversions[0]
5660 if (Candidate.Conversions[0].isBad()) {
5661 Candidate.Viable = false;
5662 Candidate.FailureKind = ovl_fail_bad_conversion;
5673 Candidate.Viable = false;
5674 Candidate.FailureKind = ovl_fail_trivial_conversion;
5695 Candidate.Viable = false;
5696 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5716 Candidate.FinalConversion = ICS.Standard;
5724 Candidate.Viable = false;
5725 Candidate.FailureKind = ovl_fail_final_conversion_not_exact;
5735 Candidate.Viable = false;
5736 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5741 Candidate.Viable = false;
5742 Candidate.FailureKind = ovl_fail_bad_final_conversion;
5752 /// candidate to the overload set, using template argument deduction
5773 OverloadCandidate &Candidate = CandidateSet.addCandidate();
5774 Candidate.FoundDecl = FoundDecl;
5775 Candidate.Function = FunctionTemplate->getTemplatedDecl();
5776 Candidate.Viable = false;
5777 Candidate.FailureKind = ovl_fail_bad_deduction;
5778 Candidate.IsSurrogate = false;
5779 Candidate.IgnoreObjectArgument = false;
5780 Candidate.ExplicitCallArguments = 1;
5781 Candidate.DeductionFailure = MakeDeductionFailureInfo(Context, Result,
5787 // template argument deduction as a candidate.
5793 /// AddSurrogateCandidate - Adds a "surrogate" candidate function that
5811 OverloadCandidate &Candidate = CandidateSet.addCandidate(Args.size() + 1);
5812 Candidate.FoundDecl = FoundDecl;
5813 Candidate.Function = 0;
5814 Candidate.Surrogate = Conversion;
5815 Candidate.Viable = true;
5816 Candidate.IsSurrogate = true;
5817 Candidate.IgnoreObjectArgument = false;
5818 Candidate.ExplicitCallArguments = Args.size();
5827 Candidate.Viable = false;
5828 Candidate.FailureKind = ovl_fail_bad_conversion;
5829 Candidate.Conversions[0] = ObjectInit;
5836 Candidate.Conversions[0].setUserDefined();
5837 Candidate.Conversions[0].UserDefined.Before = ObjectInit.Standard;
5838 Candidate.Conversions[0].UserDefined.EllipsisConversion = false;
5839 Candidate.Conversions[0].UserDefined.HadMultipleCandidates = false;
5840 Candidate.Conversions[0].UserDefined.ConversionFunction = Conversion;
5841 Candidate.Conversions[0].UserDefined.FoundConversionFunction = FoundDecl;
5842 Candidate.Conversions[0].UserDefined.After
5843 = Candidate.Conversions[0].UserDefined.Before;
5844 Candidate.Conversions[0].UserDefined.After.setAsIdentityConversion();
5849 // (C++ 13.3.2p2): A candidate function having fewer than m
5853 Candidate.Viable = false;
5854 Candidate.FailureKind = ovl_fail_too_many_arguments;
5862 Candidate.Viable = false;
5863 Candidate.FailureKind = ovl_fail_too_few_arguments;
5876 Candidate.Conversions[ArgIdx + 1]
5882 if (Candidate.Conversions[ArgIdx + 1].isBad()) {
5883 Candidate.Viable = false;
5884 Candidate.FailureKind = ovl_fail_bad_conversion;
5891 Candidate.Conversions[ArgIdx + 1].setEllipsis();
5916 // three sets of candidate functions, designated member
5945 /// AddBuiltinCandidate - Add a candidate for a built-in
5947 /// of the built-in candidate, respectively. Args and NumArgs are the
5948 /// arguments being passed to the candidate. IsAssignmentOperator
5949 /// should be true when this built-in candidate is an assignment
5961 // Add this candidate
5962 OverloadCandidate &Candidate = CandidateSet.addCandidate(NumArgs);
5963 Candidate.FoundDecl = DeclAccessPair::make(0, AS_none);
5964 Candidate.Function = 0;
5965 Candidate.IsSurrogate = false;
5966 Candidate.IgnoreObjectArgument = false;
5967 Candidate.BuiltinTypes.ResultTy = ResultTy;
5969 Candidate.BuiltinTypes.ParamTypes[ArgIdx] = ParamTys[ArgIdx];
5973 Candidate.Viable = true;
5974 Candidate.ExplicitCallArguments = NumArgs;
5982 // parameter of a built-in candidate.
5991 Candidate.Conversions[ArgIdx]
5994 Candidate.Conversions[ArgIdx]
6001 if (Candidate.Conversions[ArgIdx].isBad()) {
6002 Candidate.Viable = false;
6003 Candidate.FailureKind = ovl_fail_bad_conversion;
6010 /// candidate operator functions for built-in operators (C++
6037 /// were present in the candidate set.
6041 /// candidate set.
6045 /// candidate type set.
6297 /// given type to the candidate set.
6382 /// operator overloads from the standard to a candidate set.
6384 // Common instance state available to all overload candidate addition methods.
6528 // and our candidate type is a non-restrict-qualified pointer.
6585 // is either volatile or empty, there exist candidate operator
6595 // candidate operator functions of the form
6616 // empty, there exist candidate operator functions of the form
6641 // exist candidate operator functions of the form
6647 // ref-qualifier, there exist candidate operator functions of the form
6669 // For every promoted arithmetic type T, there exist candidate
6695 // For every type T, there exist candidate operator functions of
6710 candidate
6735 // For every pointer to member type T, there exist candidate operator
6750 // Don't add the same builtin candidate twice.
6764 // std::nullptr_t, there exist candidate operator functions of the form
6774 // If there is a user-written candidate with the same name and parameter
6775 // types as a built-in candidate operator function, the built-in operator
6776 // function is hidden and is not included in the set of candidate
6824 // Don't add the same builtin candidate twice.
6838 // Don't add the same builtin candidate twice, or if a user defined
6839 // candidate exists.
6866 // there exist candidate operator functions of the form
6877 // exist candidate operator functions of the form
6920 // exist candidate operator functions of the form
6939 // candidate operator functions of the form
6990 // exist candidate operator functions of the form
7023 // empty, there exist candidate operator functions of the form
7058 // volatile or empty, there exist candidate operator functions
7067 // empty, there exist candidate operator functions of the form
7130 // Make sure we don't add the same candidate twice.
7181 // arithmetic type, there exist candidate operator functions of
7199 // Add this built-in operator as a candidate (VQ is empty).
7205 // Add this built-in operator as a candidate (VQ is 'volatile').
7228 // Add this built-in operator as a candidate (VQ is empty).
7233 // Add this built-in operator as a candidate (VQ is 'volatile').
7249 // type, there exist candidate operator functions of the form
7267 // Add this built-in operator as a candidate (VQ is empty).
7272 // Add this built-in operator as a candidate (VQ is 'volatile').
7285 // There also exist candidate operator functions of the form
7306 // exist candidate operator functions of the form
7349 // there exist candidate operator functions of the form
7403 // enumeration type, there exist candidate operator functions of the form
7456 /// operator overloads to the candidate set (C++ [over.built]), based
7468 // candidate types or either arithmetic or enumeral candidate types.
7493 // Exit early when no non-record types have been added to the candidate set
7648 /// candidate set (C++ [basic.lookup.argdep]).
7698 /// candidate is a better candidate than the second (C++ 13.3.3p1).
7727 assert(Cand2.NumConversions == NumArgs && "Overload candidate mismatch");
7814 /// within an overload candidate set.
7820 /// function, \p Best points to the candidate function found.
7908 // This actually gets spelled 'candidate function' for now, but
7938 // Notes the location of an overload candidate.
7990 assert(Cand->Function && "for now, candidate must be a function");
8365 // If this candidate was disabled by enable_if, say so.
8418 /// Generates a 'note' diagnostic for an overload candidate. We've
8422 /// pointed at the candidate declaration. Yes, this creates some
8428 /// It would be great to be able to express per-candidate problems
8712 assert(ConvIdx != ConvCount && "no bad conversion in candidate");
8769 // Store the FixIt in the candidate if it exists.
8781 /// diagnostic messages containing the candidates in the candidate
8799 // Otherwise, this a non-viable builtin candidate. We do not, in general,
8800 // want to list every possible builtin candidate.
8816 // Set an arbitrary limit on the number of candidate functions we'll spam
8818 // candidate list.
9333 // Ideally we would note which candidate was chosen and why
9374 /// \brief Add a single candidate to the overload set.
9403 assert(!KnownValid && "unhandled case in overloaded call candidate");
9469 /// Returns true if a viable candidate was found and a diagnostic was issued.
9562 /// Returns true if a viable candidate was found and a diagnostic was issued.
9586 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9587 if (!candidate.getCorrectionDecl())
9588 return candidate.isKeyword();
9590 for (TypoCorrection::const_decl_iterator DI = candidate.begin(),
9591 DIEnd = candidate.end(); DI != DIEnd; ++DI) {
9631 virtual bool ValidateCandidate(const TypoCorrection &candidate) {
9733 // Add the functions denoted by the callee to the set of candidate
10797 // candidate functions includes at least the function call
10831 // is also considered as a candidate function. Similarly,
10832 // surrogate call functions are added to the set of candidate