struct OverloadCandidate
Declaration
struct OverloadCandidate { /* full declaration omitted */ };
Description
OverloadCandidate - A single candidate in an overload set (C++ 13.3).
Declared at: clang/include/clang/Sema/Overload.h:810
Member Variables
- public clang::FunctionDecl* 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]).
- public clang::DeclAccessPair FoundDecl
- FoundDecl - The original declaration that was looked up / invented / otherwise found, together with its access. Might be a UsingShadowDecl or a FunctionTemplateDecl.
- public clang::QualType[3] BuiltinParamTypes
- BuiltinParamTypes - Provides the parameter types of a built-in overload candidate. Only valid when Function is NULL.
- public clang::CXXConversionDecl* Surrogate
- Surrogate - The conversion function for which this candidate is a surrogate, but only if IsSurrogate is true.
- public clang::ConversionSequenceList Conversions
- The conversion sequences used to convert the function arguments to the function parameters. Note that these are indexed by argument, so may not match the parameter order of Function.
- public clang::ConversionFixItGenerator Fix
- The FixIt hints which can be used to fix the Bad candidate.
- public bool Viable
- Viable - True to indicate that this overload candidate is viable.
- public bool Best
- For an ambiguous overload resolution, indicates whether this candidate was part of the ambiguity kernel: the minimal non-empty set of viable candidates such that all elements of the ambiguity kernel are better than all viable candidates not in the ambiguity kernel.
- public 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]).
- public bool 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.
- public CallExpr::ADLCallKind IsADLCandidate
- True if the candidate was found using ADL.
- public unsigned int RewriteKind
- Whether this is a rewritten candidate, and if so, of what kind?
- public unsigned char FailureKind
- FailureKind - The reason why this candidate is not viable. Actually an OverloadFailureKind.
- public unsigned int ExplicitCallArguments
- The number of call arguments that were explicitly provided, to be used while performing partial ordering of function templates.
- public anonymous struct / union
Method Overview
- private OverloadCandidate()
- public bool TryToFixBadConversion(unsigned int Idx, clang::Sema & S)
- public unsigned int getNumParams() const
- public clang::OverloadCandidateRewriteKind getRewriteKind() const
- public bool hasAmbiguousConversion() const
- public bool isReversed() const
Methods
¶OverloadCandidate()
OverloadCandidate()
Declared at: clang/include/clang/Sema/Overload.h:933
¶bool TryToFixBadConversion(unsigned int Idx,
clang::Sema& S)
bool TryToFixBadConversion(unsigned int Idx,
clang::Sema& S)
Declared at: clang/include/clang/Sema/Overload.h:906
Parameters
- unsigned int Idx
- clang::Sema& S
¶unsigned int getNumParams() const
unsigned int getNumParams() const
Declared at: clang/include/clang/Sema/Overload.h:919
¶clang::OverloadCandidateRewriteKind
getRewriteKind() const
clang::OverloadCandidateRewriteKind
getRewriteKind() const
Description
Get RewriteKind value in OverloadCandidateRewriteKind type (This function is to workaround the spurious GCC bitfield enum warning)
Declared at: clang/include/clang/Sema/Overload.h:890
¶bool hasAmbiguousConversion() const
bool hasAmbiguousConversion() const
Description
hasAmbiguousConversion - Returns whether this overload candidate requires an ambiguous conversion or not.
Declared at: clang/include/clang/Sema/Overload.h:898
¶bool isReversed() const
bool isReversed() const
Declared at: clang/include/clang/Sema/Overload.h:894