clang API Documentation

Classes | Public Member Functions | Public Attributes
clang::OverloadCandidate Struct Reference

OverloadCandidate - A single candidate in an overload set (C++ 13.3). More...

#include <Overload.h>

Collaboration diagram for clang::OverloadCandidate:
Collaboration graph
[legend]

List of all members.

Classes

struct  DeductionFailureInfo

Public Member Functions

bool hasAmbiguousConversion () const
bool TryToFixBadConversion (unsigned Idx, Sema &S)

Public Attributes

FunctionDeclFunction
DeclAccessPair FoundDecl
struct {
   QualType   ResultTy
   QualType   ParamTypes [3]
BuiltinTypes
CXXConversionDeclSurrogate
ImplicitConversionSequenceConversions
ConversionFixItGenerator Fix
 The FixIt hints which can be used to fix the Bad candidate.
unsigned NumConversions
 NumConversions - The number of elements in the Conversions array.
bool Viable
 Viable - True to indicate that this overload candidate is viable.
bool IsSurrogate
bool IgnoreObjectArgument
unsigned char FailureKind
unsigned ExplicitCallArguments
 The number of call arguments that were explicitly provided, to be used while performing partial ordering of function templates.
union {
   DeductionFailureInfo   DeductionFailure
   StandardConversionSequence   FinalConversion
}; 

Detailed Description

OverloadCandidate - A single candidate in an overload set (C++ 13.3).

Definition at line 599 of file Overload.h.


Member Function Documentation

bool clang::OverloadCandidate::hasAmbiguousConversion ( ) const [inline]

hasAmbiguousConversion - Returns whether this overload candidate requires an ambiguous conversion or not.

Definition at line 714 of file Overload.h.

References Conversions, and NumConversions.

bool clang::OverloadCandidate::TryToFixBadConversion ( unsigned  Idx,
Sema S 
) [inline]

Member Data Documentation

union { ... }

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 626 of file Overload.h.

Referenced by clang::Sema::AddBuiltinCandidate(), clang::OverloadCandidateSet::addCandidate(), clang::Sema::AddConversionCandidate(), clang::Sema::AddMethodCandidate(), clang::Sema::AddOverloadCandidate(), clang::Sema::AddSurrogateCandidate(), hasAmbiguousConversion(), clang::isBetterOverloadCandidate(), and TryToFixBadConversion().

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 709 of file Overload.h.

Referenced by clang::Sema::AddConversionCandidate(), and clang::isBetterOverloadCandidate().

The FixIt hints which can be used to fix the Bad candidate.

Definition at line 629 of file Overload.h.

Referenced by TryToFixBadConversion().

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 604 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::isBetterOverloadCandidate(), and clang::OverloadCandidateSet::NoteCandidates().

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 649 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(), and clang::isBetterOverloadCandidate().

NumConversions - The number of elements in the Conversions array.

Definition at line 632 of file Overload.h.

Referenced by clang::OverloadCandidateSet::addCandidate(), hasAmbiguousConversion(), and clang::isBetterOverloadCandidate().

Definition at line 615 of file Overload.h.

Referenced by clang::Sema::AddBuiltinCandidate().

Definition at line 614 of file Overload.h.

Referenced by clang::Sema::AddBuiltinCandidate().

Surrogate - The conversion function for which this candidate is a surrogate, but only if IsSurrogate is true.

Definition at line 620 of file Overload.h.

Referenced by clang::Sema::AddSurrogateCandidate().


The documentation for this struct was generated from the following file: