Go to the documentation of this file.
14 #ifndef LLVM_CLANG_SEMA_OVERLOAD_H
15 #define LLVM_CLANG_SEMA_OVERLOAD_H
28 #include "llvm/ADT/ArrayRef.h"
29 #include "llvm/ADT/None.h"
30 #include "llvm/ADT/STLExtras.h"
31 #include "llvm/ADT/SmallPtrSet.h"
32 #include "llvm/ADT/SmallVector.h"
33 #include "llvm/ADT/StringRef.h"
34 #include "llvm/Support/AlignOf.h"
35 #include "llvm/Support/Allocator.h"
36 #include "llvm/Support/Casting.h"
37 #include "llvm/Support/ErrorHandling.h"
336 assert(Idx < 3 &&
"To type index is out of range");
351 assert(Idx < 3 &&
"To type index is out of range");
365 bool IgnoreFloatToIntegralConversion =
false)
const;
538 unsigned ConversionKind : 31;
541 unsigned InitializerListOfIncompleteArray : 1;
548 QualType InitializerListContainerType;
550 void setKind(
Kind K) {
579 : ConversionKind(Uninitialized),
580 InitializerListOfIncompleteArray(
false) {
585 : ConversionKind(Other.ConversionKind),
586 InitializerListOfIncompleteArray(
587 Other.InitializerListOfIncompleteArray),
588 InitializerListContainerType(Other.InitializerListContainerType) {
589 switch (ConversionKind) {
590 case Uninitialized:
break;
611 assert(
isInitialized() &&
"querying uninitialized conversion");
612 return Kind(ConversionKind);
638 llvm_unreachable(
"Invalid ImplicitConversionSequence::Kind!");
657 Bad.
init(Failure, FromExpr, ToType);
664 Bad.
init(Failure, FromType, ToType);
687 return !InitializerListContainerType.isNull();
690 InitializerListContainerType = T;
691 InitializerListOfIncompleteArray = IA;
694 return InitializerListOfIncompleteArray;
698 "not initializer list container");
699 return InitializerListContainerType;
706 bool NeedLValToRVal) {
896 if (!C.isInitialized())
return false;
897 if (C.isAmbiguous())
return true;
1028 llvm::BumpPtrAllocator SlabAllocator;
1032 OperatorRewriteInfo RewriteInfo;
1034 constexpr
static unsigned NumInlineBytes =
1036 unsigned NumInlineBytesUsed = 0;
1037 alignas(
void *)
char InlineSpace[NumInlineBytes];
1048 template <
typename T>
1049 T *slabAllocate(
unsigned N) {
1051 static_assert(
alignof(T) ==
alignof(
void *),
1052 "Only works for pointer-aligned types.");
1053 static_assert(std::is_trivial<T>::value ||
1054 std::is_same<ImplicitConversionSequence, T>::value,
1055 "Add destruction logic to OverloadCandidateSet::clear().");
1057 unsigned NBytes =
sizeof(T) * N;
1058 if (NBytes > NumInlineBytes - NumInlineBytesUsed)
1059 return SlabAllocator.Allocate<T>(N);
1060 char *FreeSpaceStart = InlineSpace + NumInlineBytesUsed;
1061 assert(
uintptr_t(FreeSpaceStart) %
alignof(
void *) == 0 &&
1062 "Misaligned storage!");
1064 NumInlineBytesUsed += NBytes;
1065 return reinterpret_cast<T *
>(FreeSpaceStart);
1068 void destroyCandidates();
1073 : Loc(Loc), Kind(CSK), RewriteInfo(RewriteInfo) {}
1091 return Functions.insert(Key).second;
1108 size_t size()
const {
return Candidates.size(); }
1109 bool empty()
const {
return Candidates.empty(); }
1116 slabAllocate<ImplicitConversionSequence>(NumConversions);
1119 for (
unsigned I = 0; I != NumConversions; ++I)
1129 assert((Conversions.empty() || Conversions.size() == NumConversions) &&
1130 "preallocated conversion sequence has wrong length");
1134 C.Conversions = Conversions.empty()
1152 ArrayRef<Expr *> Args, StringRef Opc =
"",
1153 SourceLocation Loc = SourceLocation(),
1154 llvm::function_ref<
bool(OverloadCandidate &)>
Filter =
1155 [](OverloadCandidate &) {
return true; });
1158 ArrayRef<OverloadCandidate *> Cands,
1160 SourceLocation OpLoc = SourceLocation());
1167 "can't set the destination address space when not constructing an "
1175 const OverloadCandidate &Cand1,
1176 const OverloadCandidate &Cand2,
1191 if (isa<UsingDecl>(ND))
1202 Info.
Constructor = dyn_cast<CXXConstructorDecl>(D);
1222 #endif // LLVM_CLANG_SEMA_OVERLOAD_H
const_iterator begin() const
@ ovl_fail_final_conversion_not_exact
This conversion function template specialization candidate is not viable because the final conversion...
@ ICK_Compatible_Conversion
Conversions between compatible types in C99.
bool isReversible()
Determines whether this operator could be implemented by a function with reversed parameter order.
Represents a C++ constructor within a class.
StandardConversionSequence Before
Represents the standard conversion that occurs before the actual user-defined conversion.
@ ICK_Lvalue_To_Rvalue
Lvalue-to-rvalue conversion (C++ [conv.lval])
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
OverloadCandidateSet(SourceLocation Loc, CandidateSetKind CSK, OperatorRewriteInfo RewriteInfo={})
@ ovl_fail_inhctor_slice
This inherited constructor is not viable because it would slice the argument.
CXXConstructorDecl * CopyConstructor
CopyConstructor - The copy constructor that is used to perform this conversion, when the conversion i...
unsigned char FailureKind
FailureKind - The reason why this candidate is not viable.
bool shouldDeferDiags(Sema &S, ArrayRef< Expr * > Args, SourceLocation OpLoc)
Whether diagnostics should be deferred.
Represents a C++ conversion function within a class.
@ ICK_TransparentUnionConversion
Transparent Union Conversions.
OverloadCandidate & addCandidate(unsigned NumConversions=0, ConversionSequenceList Conversions=None)
Add a new candidate with NumConversions conversion sequence slots to the overload set.
@ ICK_Identity
Identity conversion (no conversion)
OverloadCandidateParamOrder
The parameter ordering that will be used for the candidate.
@ CSK_Normal
Normal lookup.
ImplicitConversionKind First
First – The first conversion can be an lvalue-to-rvalue conversion, array-to-pointer conversion,...
@ ICR_Complex_Real_Conversion
Complex <-> Real conversion.
unsigned ExplicitCallArguments
The number of call arguments that were explicitly provided, to be used while performing partial order...
void setToType(QualType T)
ImplicitConversionSequence()
void clear(CandidateSetKind CSK)
Clear out all of the candidates.
static ImplicitConversionSequence getNullptrToBool(QualType SourceType, QualType DestType, bool NeedLValToRVal)
Form an "implicit" conversion sequence from nullptr_t to bool, for a direct-initialization of a bool ...
@ ICK_Derived_To_Base
Derived-to-base (C++ [over.best.ics])
Encodes a location in the source.
@ ICK_SVE_Vector_Conversion
Arm SVE Vector conversions.
UserDefinedConversionSequence UserDefined
When ConversionKind == UserDefinedConversion, provides the details of the user-defined conversion seq...
This represents a decl that may have a name.
@ ovl_fail_constraints_not_satisfied
This candidate was not viable because its associated constraints were not satisfied.
@ OR_Success
Overload resolution succeeded.
unsigned QualificationIncludesObjCLifetime
Whether the qualification conversion involves a change in the Objective-C lifetime (for automatic ref...
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
A (possibly-)qualified type.
bool IsSurrogate
IsSurrogate - True to indicate that this candidate is a surrogate for a conversion to a function poin...
bool IgnoreObjectArgument
IgnoreObjectArgument - True to indicate that the first argument's conversion, which for this function...
@ ICR_C_Conversion
Conversion only allowed in the C standard (e.g. void* to char*).
bool isUserDefined() const
ConversionSequenceList allocateConversionSequences(unsigned NumConversions)
Allocate storage for conversion sequences for NumConversions conversions.
bool isNewCandidate(Decl *F, OverloadCandidateParamOrder PO=OverloadCandidateParamOrder::Normal)
Determine when this overload candidate will be new to the overload set.
bool EllipsisConversion
EllipsisConversion - When this is true, it means user-defined conversion sequence starts with a ....
void setAllToTypes(QualType T)
FunctionTemplateDecl * ConstructorTmpl
The class facilities generation and storage of conversion FixIts.
SmallVector< OverloadCandidate *, 32 > CompleteCandidates(Sema &S, OverloadCandidateDisplayKind OCD, ArrayRef< Expr * > Args, SourceLocation OpLoc=SourceLocation(), llvm::function_ref< bool(OverloadCandidate &)> Filter=[](OverloadCandidate &) { return true;})
void setFromExpr(Expr *E)
@ ICK_Array_To_Pointer
Array-to-pointer conversion (C++ [conv.array])
void setToType(unsigned Idx, QualType T)
QualType getToType() const
BadConversionSequence Bad
When ConversionKind == BadConversion, provides the details of the bad conversion.
@ ICR_C_Conversion_Extension
Conversion not allowed by the C standard, but that we accept as an extension anyway.
@ NK_Type_Narrowing
A narrowing conversion by virtue of the source and destination types.
ConversionSet & conversions()
unsigned BindsImplicitObjectArgumentWithoutRefQualifier
Whether this binds an implicit object argument to a non-static member function without a ref-qualifie...
ImplicitConversionSequence(const ImplicitConversionSequence &Other)
Kind
Kind - The kind of implicit conversion sequence.
DeductionFailureInfo DeductionFailure
void dump() const
dump - Print this user-defined conversion sequence to standard error.
CallExpr::ADLCallKind IsADLCandidate
True if the candidate was found using ADL.
@ ICK_Integral_Promotion
Integral promotions (C++ [conv.prom])
OverloadedOperatorKind getRewrittenOverloadedOperator(OverloadedOperatorKind Kind)
Get the other overloaded operator that the given operator can be rewritten into, if any such operator...
@ CSK_InitByUserDefinedConversion
C++ [over.match.copy]: Copy-initialization of an object of class type by user-defined conversion.
OverloadCandidateRewriteKind getRewriteKind(const FunctionDecl *FD, OverloadCandidateParamOrder PO)
Determine the kind of rewrite that should be performed for this candidate.
CXXConstructorDecl * Constructor
ConstructorInfo getConstructorInfo(NamedDecl *ND)
@ ovl_fail_illegal_constructor
This conversion candidate was not considered because it is an illegal instantiation of a constructor ...
QualType getFromType() const
@ ICK_Zero_Queue_Conversion
Zero constant to queue.
@ ICK_Complex_Conversion
Complex conversions (C99 6.3.1.6)
void dump() const
dump - Print this implicit conversion sequence to standard error.
Information about operator rewrites to consider when adding operator functions to a candidate set.
@ ICK_Function_Conversion
Function pointer conversion (C++17 [conv.fctptr])
bool AllowRewrittenCandidates
Whether we should include rewritten candidates in the overload set.
@ ICK_Pointer_Member
Pointer-to-member conversions (C++ [conv.mem])
ConversionFixItGenerator Fix
The FixIt hints which can be used to fix the Bad candidate.
bool isInitialized() const
Determines whether this conversion sequence has been initialized.
ImplicitConversionSequence & operator=(const ImplicitConversionSequence &Other)
ImplicitConversionRank
ImplicitConversionRank - The rank of an implicit conversion kind.
Declaration of a template function.
bool shouldEnforceArgLimit(bool PartialOverloading, FunctionDecl *Function)
bool isReferenceType() const
CandidateSetKind getKind() const
void setAsIdentityConversion()
StandardConversionSequence - Set the standard conversion sequence to the identity conversion.
OverloadedOperatorKind getCXXOverloadedOperator() const
If this name is the name of an overloadable operator in C++ (e.g., operator+), retrieve the kind of o...
@ OCD_ViableCandidates
Requests that only viable candidates be shown.
void init(FailureKind K, QualType From, QualType To)
void dump() const
dump - Print this standard conversion sequence to standard error.
std::pair< SourceLocation, PartialDiagnostic > PartialDiagnosticAt
A partial diagnostic along with the source location where this diagnostic occurs.
AccessSpecifier getAccess() const
static DeclAccessPair make(NamedDecl *D, AccessSpecifier AS)
bool tryToFixConversion(const Expr *FromExpr, const QualType FromQTy, const QualType ToQTy, Sema &S)
If possible, generates and stores a fix for the given conversion.
unsigned IncompatibleObjC
IncompatibleObjC - Whether this is an Objective-C conversion that we should warn about (if we actuall...
FunctionDecl * ConversionFunction
ConversionFunction - The function that will perform the user-defined conversion.
QualType getFromType() const
bool Viable
Viable - True to indicate that this overload candidate is viable.
@ ovl_fail_addr_not_available
This candidate was not viable because its address could not be taken.
@ CRK_Reversed
Candidate is a rewritten candidate with a reversed order of parameters.
BadConversionSequence - Records information about an invalid conversion sequence.
QualType getToType() const
@ ovl_fail_object_addrspace_mismatch
This constructor/conversion candidate fail due to an address space mismatch between the object being ...
A POD class for pairing a NamedDecl* with an access specifier.
A structure used to record information about a failed template argument deduction,...
SourceLocation getLocation() const
bool isIdentityConversion() const
@ CSK_InitByConstructor
C++ [over.match.ctor], [over.match.list] Initialization of an object of class type by constructor,...
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
bool isAcceptableCandidate(const FunctionDecl *FD)
unsigned RewriteKind
Whether this is a rewritten candidate, and if so, of what kind?
@ ICR_Conversion
Conversion.
@ ovl_non_default_multiversion_function
This candidate was not viable because it is a non-default multiversioned function.
unsigned ObjCLifetimeConversionBinding
Whether this binds a reference to an object with a different Objective-C lifetime qualifier.
ImplicitConversionRank GetConversionRank(ImplicitConversionKind Kind)
GetConversionRank - Retrieve the implicit conversion rank corresponding to the given implicit convers...
OverloadedOperatorKind OriginalOperator
The original operator as written in the source.
@ OCD_AmbiguousCandidates
Requests that only tied-for-best candidates be shown.
@ ICK_Boolean_Conversion
Boolean conversions (C++ [conv.bool])
@ ovl_fail_bad_target
(CUDA) This candidate was not viable because the callee was not accessible from the caller's target (...
void setDestAS(LangAS AS)
void setAsIdentityConversion(QualType T)
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
void exclude(Decl *F)
Exclude a function from being considered by overload resolution.
@ CRK_DifferentOperator
Candidate is a rewritten candidate with a different operator name.
__UINTPTR_TYPE__ uintptr_t
An unsigned integer type with the property that any valid pointer to void can be converted to this ty...
OverloadCandidateRewriteKind
The kinds of rewrite we perform on overload candidates.
@ ICK_Incompatible_Pointer_Conversion
C-only conversion between pointers with incompatible types.
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
SmallVectorImpl< OverloadCandidate >::iterator iterator
ConversionSequenceList Conversions
The conversion sequences used to convert the function arguments to the function parameters.
@ ovl_fail_trivial_conversion
This conversion candidate was not considered because it duplicates the work of a trivial or derived-t...
void DiagnoseAmbiguousConversion(Sema &S, SourceLocation CaretLoc, const PartialDiagnostic &PDiag) const
Diagnoses an ambiguous conversion.
@ OR_Deleted
Succeeded, but refers to a deleted function.
StandardConversionSequence Standard
When ConversionKind == StandardConversion, provides the details of the standard conversion sequence.
FunctionDecl * Function
Function - The actual function that this candidate represents.
unsigned DirectBinding
DirectBinding - True when this is a reference binding that is a direct binding (C++ [dcl....
@ NK_Constant_Narrowing
A narrowing conversion, because a constant expression got narrowed.
@ ICK_Floating_Promotion
Floating point promotions (C++ [conv.fpprom])
void setFromType(QualType T)
bool shouldAddReversed(OverloadedOperatorKind Op)
Determine whether we should consider looking for and adding reversed candidates for operator Op.
@ ICK_Block_Pointer_Conversion
Block Pointer conversions.
SmallVector< std::pair< NamedDecl *, FunctionDecl * >, 4 > ConversionSet
bool HadMultipleCandidates
HadMultipleCandidates - When this is true, it means that the conversion function was resolved from an...
@ ovl_fail_bad_conversion
ImplicitConversionKind Second
Second - The second conversion can be an integral promotion, floating point promotion,...
@ ICK_Vector_Splat
A vector splat from an arithmetic type.
void copyFrom(const AmbiguousConversionSequence &)
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
void NoteCandidates(PartialDiagnosticAt PA, Sema &S, OverloadCandidateDisplayKind OCD, ArrayRef< Expr * > Args, StringRef Opc="", SourceLocation Loc=SourceLocation(), llvm::function_ref< bool(OverloadCandidate &)> Filter=[](OverloadCandidate &) { return true;})
When overload resolution fails, prints diagnostic messages containing the candidates in the candidate...
void * FromTypePtr
FromType - The type that this conversion is converting from.
@ ICK_Function_To_Pointer
Function-to-pointer (C++ [conv.array])
DeclAccessPair FoundDecl
FoundDecl - The original declaration that was looked up / invented / otherwise found,...
OperatorRewriteInfo getRewriteInfo() const
const ConversionSet & conversions() const
LangAS
Defines the address space values used by the address space qualifier of QualType.
OverloadCandidateSet - A set of overload candidates, used in C++ overload resolution (C++ 13....
@ OCD_AllCandidates
Requests that all candidates be shown.
const T * castAs() const
Member-template castAs<specific type>.
OverloadingResult BestViableFunction(Sema &S, SourceLocation Loc, OverloadCandidateSet::iterator &Best)
Find the best viable function on this overload set, if it exists.
@ ICK_Zero_Event_Conversion
Zero constant to event (OpenCL1.2 6.12.10)
bool isRewrittenOperator(const FunctionDecl *FD)
Would use of this function result in a rewrite using a different operator?
OperatorRewriteInfo(OverloadedOperatorKind Op, bool AllowRewritten)
@ OO_None
Not an overloaded operator.
QualType getInitializerListContainerType() const
OverloadCandidateSet & operator=(const OverloadCandidateSet &)=delete
Represents an ambiguous user-defined conversion sequence.
bool isPointerType() const
@ ICR_Exact_Match
Exact Match.
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3....
@ OR_No_Viable_Function
No viable function found.
OverloadCandidateDisplayKind
@ CRK_None
Candidate is not a rewritten candidate.
Represents a prototype with parameter type info, e.g.
UserDefinedConversionSequence - Represents a user-defined conversion sequence (C++ 13....
QualType getConversionType() const
Returns the type that this conversion function is converting to.
ConversionSet::iterator iterator
void setFromType(QualType T)
Decl - This represents one declaration (or definition), e.g.
@ ICK_Floating_Integral
Floating-integral conversions (C++ [conv.fpint])
void setBad(BadConversionSequence::FailureKind Failure, Expr *FromExpr, QualType ToType)
Sets this sequence as a bad conversion for an explicit argument.
@ ICK_Vector_Conversion
Vector conversions.
OverloadCandidate - A single candidate in an overload set (C++ 13.3).
unsigned ReferenceBinding
ReferenceBinding - True when this is a reference binding (C++ [over.ics.ref]).
unsigned DeprecatedStringLiteralToCharPtr
Whether this is the deprecated conversion of a string literal to a pointer to non-const character dat...
Sema - This implements semantic analysis and AST building for C.
ImplicitConversionRank getRank() const
getRank - Retrieve the rank of this standard conversion sequence (C++ 13.3.3.1.1p3).
@ OR_Ambiguous
Ambiguous candidates found.
ImplicitConversionKind
ImplicitConversionKind - The kind of implicit conversion used to convert an argument to a parameter's...
~ImplicitConversionSequence()
void setFromType(QualType T)
@ ICR_Promotion
Promotion.
unsigned IsLvalueReference
Whether this is an lvalue reference binding (otherwise, it's an rvalue reference binding).
@ ovl_fail_bad_final_conversion
This conversion candidate is not viable because its result type is not implicitly convertible to the ...
QualType getToType(unsigned Idx) const
StandardConversionSequence FinalConversion
FinalConversion - For a conversion function (where Function is a CXXConversionDecl),...
static QualType getFromOpaquePtr(const void *Ptr)
OverloadingResult
OverloadingResult - Capture the result of performing overload resolution.
FunctionDecl * getTemplatedDecl() const
Get the underlying function declaration of the template.
bool isBetterOverloadCandidate(Sema &S, const OverloadCandidate &Cand1, const OverloadCandidate &Cand2, SourceLocation Loc, OverloadCandidateSet::CandidateSetKind Kind)
isBetterOverloadCandidate - Determines whether the first overload candidate is a better candidate tha...
@ ICK_Writeback_Conversion
Objective-C ARC writeback conversion.
@ ICR_OCL_Scalar_Widening
OpenCL Scalar Widening.
bool TryToFixBadConversion(unsigned Idx, Sema &S)
CXXConversionDecl * Surrogate
Surrogate - The conversion function for which this candidate is a surrogate, but only if IsSurrogate ...
void setBad(BadConversionSequence::FailureKind Failure, QualType FromType, QualType ToType)
Sets this sequence as a bad conversion for an implicit argument.
NarrowingKind getNarrowingKind(ASTContext &Context, const Expr *Converted, APValue &ConstantValue, QualType &ConstantType, bool IgnoreFloatToIntegralConversion=false) const
Check if this standard conversion sequence represents a narrowing conversion, according to C++11 [dcl...
@ ICK_Complex_Real
Complex-real conversions (C99 6.3.1.7)
unsigned getKindRank() const
Return a ranking of the implicit conversion sequence kind, where smaller ranks represent better conve...
void setInitializerListContainerType(QualType T, bool IA)
unsigned getNumParams() const
@ ICK_C_Only_Conversion
Conversions allowed in C, but not C++.
bool isPointerConversionToVoidPointer(ASTContext &Context) const
isPointerConversionToVoidPointer - Determines whether this conversion is a conversion of a pointer to...
ImplicitConversionKind Third
Third - The third conversion can be a qualification conversion or a function conversion.
unsigned BindsToFunctionLvalue
Whether we're binding to a function lvalue.
AmbiguousConversionSequence Ambiguous
When ConversionKind == AmbiguousConversion, provides the details of the ambiguous conversion.
@ ICK_Floating_Conversion
Floating point conversions (C++ [conv.double].
@ NK_Variable_Narrowing
A narrowing conversion, because a non-constant-expression variable might have got narrowed.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
llvm::MutableArrayRef< ImplicitConversionSequence > ConversionSequenceList
A list of implicit conversion sequences for the arguments of an OverloadCandidate.
QualType BuiltinParamTypes[3]
BuiltinParamTypes - Provides the parameter types of a built-in overload candidate.
@ ovl_fail_too_few_arguments
@ ICK_Num_Conversion_Kinds
The number of conversion kinds.
NarrowingKind
NarrowingKind - The kind of narrowing conversion being performed by a standard conversion sequence ac...
OverloadCandidateRewriteKind getRewriteKind() const
Get RewriteKind value in OverloadCandidateRewriteKind type (This function is to workaround the spurio...
bool hasAmbiguousConversion() const
hasAmbiguousConversion - Returns whether this overload candidate requires an ambiguous conversion or ...
bool isPointerConversionToBool() const
isPointerConversionToBool - Determines whether this conversion is a conversion of a pointer or pointe...
bool isInitializerListOfIncompleteArray() const
void * getAsOpaquePtr() const
QualType getFromType() const
DeclAccessPair FoundCopyConstructor
@ ICK_Pointer_Conversion
Pointer conversions (C++ [conv.ptr])
char Buffer[sizeof(ConversionSet)]
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
@ ovl_fail_enable_if
This candidate function was not viable because an enable_if attribute disabled it.
This represents one expression.
@ NK_Dependent_Narrowing
Cannot tell whether this is a narrowing conversion because the expression is value-dependent.
unsigned BindsToRvalue
Whether we're binding to an rvalue.
@ NK_Not_Narrowing
Not a narrowing conversion.
@ ovl_fail_explicit
This candidate constructor or conversion function is explicit but the context doesn't permit explicit...
const_iterator end() const
@ CSK_Operator
C++ [over.match.oper]: Lookup of operator function candidates in a call using operator syntax.
@ ICK_Qualification
Qualification conversions (C++ [conv.qual])
ConversionSet::const_iterator const_iterator
Represents a function declaration or definition.
void * ToTypePtrs[3]
ToType - The types that this conversion is converting to in each step.
@ ovl_fail_too_many_arguments
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
DeclAccessPair FoundConversionFunction
The declaration that we found via name lookup, which might be the same as ConversionFunction or it mi...
@ ICK_Integral_Conversion
Integral conversions (C++ [conv.integral])
@ ICR_Writeback_Conversion
ObjC ARC writeback conversion.
bool Best
Whether this candidate is the best viable function, or tied for being the best viable function.
void addConversion(NamedDecl *Found, FunctionDecl *D)
ImplicitConversionSequence - Represents an implicit conversion sequence, which may be a standard conv...
StandardConversionSequence After
After - Represents the standard conversion that occurs after the actual user-defined conversion.
void setToType(QualType T)
bool hasInitializerListContainerType() const
@ ICK_Complex_Promotion
Complex promotions (Clang extension)
void init(FailureKind K, Expr *From, QualType To)