clang
3.9.0
|
OverloadCandidate - A single candidate in an overload set (C++ 13.3). More...
#include <Overload.h>
Public Member Functions | |
bool | hasAmbiguousConversion () const |
hasAmbiguousConversion - Returns whether this overload candidate requires an ambiguous conversion or not. More... | |
bool | TryToFixBadConversion (unsigned Idx, Sema &S) |
unsigned | getNumParams () const |
Public Attributes | |
FunctionDecl * | Function |
Function - The actual function that this candidate represents. More... | |
DeclAccessPair | FoundDecl |
FoundDecl - The original declaration that was looked up / invented / otherwise found, together with its access. More... | |
struct { | |
QualType ResultTy | |
QualType ParamTypes [3] | |
} | BuiltinTypes |
CXXConversionDecl * | Surrogate |
Surrogate - The conversion function for which this candidate is a surrogate, but only if IsSurrogate is true. More... | |
ImplicitConversionSequence * | Conversions |
Conversions - The conversion sequences used to convert the function arguments to the function parameters, the pointer points to a fixed size array with NumConversions elements. More... | |
ConversionFixItGenerator | Fix |
The FixIt hints which can be used to fix the Bad candidate. More... | |
unsigned | NumConversions |
NumConversions - The number of elements in the Conversions array. More... | |
bool | Viable |
Viable - True to indicate that this overload candidate is viable. More... | |
bool | IsSurrogate |
IsSurrogate - True to indicate that this candidate is a surrogate for a conversion to a function pointer or reference (C++ [over.call.object]). More... | |
bool | IgnoreObjectArgument |
IgnoreObjectArgument - True to indicate that the first argument's conversion, which for this function represents the implicit object argument, should be ignored. More... | |
unsigned char | FailureKind |
FailureKind - The reason why this candidate is not viable. More... | |
unsigned | ExplicitCallArguments |
The number of call arguments that were explicitly provided, to be used while performing partial ordering of function templates. More... | |
union { | |
DeductionFailureInfo DeductionFailure | |
StandardConversionSequence FinalConversion | |
FinalConversion - For a conversion function (where Function is a CXXConversionDecl), the standard conversion that occurs after the call to the overload candidate to convert the result of calling the conversion function to the required type. More... | |
}; | |
OverloadCandidate - A single candidate in an overload set (C++ 13.3).
Definition at line 593 of file Overload.h.
|
inline |
Definition at line 686 of file Overload.h.
References ExplicitCallArguments, Function, clang::Type::getAs(), clang::CXXConversionDecl::getConversionType(), clang::FunctionDecl::getNumParams(), clang::Type::getPointeeType(), IsSurrogate, and Surrogate.
|
inline |
hasAmbiguousConversion - Returns whether this overload candidate requires an ambiguous conversion or not.
Definition at line 665 of file Overload.h.
References Conversions, and NumConversions.
Definition at line 673 of file Overload.h.
References clang::ImplicitConversionSequence::Bad, clang::ConversionFixItGenerator::clear(), Conversions, Fix, clang::BadConversionSequence::getFromType(), clang::BadConversionSequence::getToType(), S, and clang::ConversionFixItGenerator::tryToFixConversion().
Referenced by CompleteNonViableCandidate().
union { ... } |
struct { ... } clang::OverloadCandidate::BuiltinTypes |
Referenced by clang::Sema::AddBuiltinCandidate(), CompleteNonViableCandidate(), and NoteBuiltinOperatorCandidate().
ImplicitConversionSequence* clang::OverloadCandidate::Conversions |
Conversions - The conversion sequences used to convert the function arguments to the function parameters, the pointer points to a fixed size array with NumConversions elements.
The memory is owned by the OverloadCandidateSet.
Definition at line 620 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::OverloadCandidateSet::addCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), CompleteNonViableCandidate(), DiagnoseBadConversion(), hasAmbiguousConversion(), clang::isBetterOverloadCandidate(), NoteAmbiguousUserConversions(), NoteFunctionCandidate(), and TryToFixBadConversion().
DeductionFailureInfo clang::OverloadCandidate::DeductionFailure |
Definition at line 654 of file Overload.h.
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), CheckArityMismatch(), DiagnoseBadDeduction(), and DiagnoseFailedEnableIfAttr().
unsigned clang::OverloadCandidate::ExplicitCallArguments |
The number of call arguments that were explicitly provided, to be used while performing partial ordering of function templates.
Definition at line 651 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), getNumParams(), and clang::isBetterOverloadCandidate().
unsigned char clang::OverloadCandidate::FailureKind |
FailureKind - The reason why this candidate is not viable.
Actually an OverloadFailureKind.
Definition at line 647 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), CheckArityMismatch(), CompleteNonViableCandidate(), and NoteFunctionCandidate().
StandardConversionSequence clang::OverloadCandidate::FinalConversion |
FinalConversion - For a conversion function (where Function is a CXXConversionDecl), the standard conversion that occurs after the call to the overload candidate to convert the result of calling the conversion function to the required type.
Definition at line 660 of file Overload.h.
Referenced by clang::Sema::AddConversionCandidate(), and clang::isBetterOverloadCandidate().
ConversionFixItGenerator clang::OverloadCandidate::Fix |
The FixIt hints which can be used to fix the Bad candidate.
Definition at line 623 of file Overload.h.
Referenced by CompleteNonViableCandidate(), DiagnoseBadConversion(), and TryToFixBadConversion().
DeclAccessPair clang::OverloadCandidate::FoundDecl |
FoundDecl - The original declaration that was looked up / invented / otherwise found, together with its access.
Might be a UsingShadowDecl or a FunctionTemplateDecl.
Definition at line 603 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), DiagnoseArityMismatch(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadTarget(), clang::isBetterOverloadCandidate(), and NoteFunctionCandidate().
FunctionDecl* clang::OverloadCandidate::Function |
Function - The actual function that this candidate represents.
When NULL, this is a built-in candidate (C++ [over.oper]) or a surrogate for a conversion to a function pointer or reference (C++ [over.call.object]).
Definition at line 598 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), clang::OverloadCandidateSet::BestViableFunction(), CheckArityMismatch(), CompleteNonViableCandidate(), DiagnoseArityMismatch(), DiagnoseBadConversion(), DiagnoseBadDeduction(), DiagnoseBadTarget(), DiagnoseFailedEnableIfAttr(), GetLocationForCandidate(), getNumParams(), clang::isBetterOverloadCandidate(), clang::OverloadCandidateSet::NoteCandidates(), and NoteFunctionCandidate().
bool clang::OverloadCandidate::IgnoreObjectArgument |
IgnoreObjectArgument - True to indicate that the first argument's conversion, which for this function represents the implicit object argument, should be ignored.
This will be true when the candidate is a static member function (where the implicit object argument is just a placeholder) or a non-static member function when the call doesn't have an object argument.
Definition at line 643 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), CompleteNonViableCandidate(), clang::isBetterOverloadCandidate(), and NoteFunctionCandidate().
bool clang::OverloadCandidate::IsSurrogate |
IsSurrogate - True to indicate that this candidate is a surrogate for a conversion to a function pointer or reference (C++ [over.call.object]).
Definition at line 634 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), CompleteNonViableCandidate(), GetLocationForCandidate(), getNumParams(), and clang::OverloadCandidateSet::NoteCandidates().
unsigned clang::OverloadCandidate::NumConversions |
NumConversions - The number of elements in the Conversions array.
Definition at line 626 of file Overload.h.
Referenced by clang::OverloadCandidateSet::addCandidate(), CompleteNonViableCandidate(), hasAmbiguousConversion(), clang::isBetterOverloadCandidate(), NoteAmbiguousUserConversions(), NoteBuiltinOperatorCandidate(), and NoteFunctionCandidate().
QualType clang::OverloadCandidate::ParamTypes[3] |
Definition at line 609 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), CompleteNonViableCandidate(), and NoteBuiltinOperatorCandidate().
QualType clang::OverloadCandidate::ResultTy |
Definition at line 608 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate().
CXXConversionDecl* clang::OverloadCandidate::Surrogate |
Surrogate - The conversion function for which this candidate is a surrogate, but only if IsSurrogate is true.
Definition at line 614 of file Overload.h.
Referenced by clang::Sema::AddSurrogateCandidate(), CompleteNonViableCandidate(), GetLocationForCandidate(), getNumParams(), and NoteSurrogateCandidate().
bool clang::OverloadCandidate::Viable |
Viable - True to indicate that this overload candidate is viable.
Definition at line 629 of file Overload.h.
Referenced by clang::Sema::AddBuiltinCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddMethodTemplateCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), clang::Sema::AddTemplateConversionCandidate(), clang::Sema::AddTemplateOverloadCandidate(), clang::OverloadCandidateSet::BestViableFunction(), CompleteNonViableCandidate(), clang::isBetterOverloadCandidate(), clang::OverloadCandidateSet::NoteCandidates(), and NoteFunctionCandidate().