clang API Documentation
#include <Overload.h>

Public Member Functions | |
| void | setFromType (QualType T) |
| void | setToType (unsigned Idx, QualType T) |
| void | setAllToTypes (QualType T) |
| QualType | getFromType () const |
| QualType | getToType (unsigned Idx) const |
| void | setAsIdentityConversion () |
| bool | isIdentityConversion () const |
| ImplicitConversionRank | getRank () const |
| bool | isPointerConversionToBool () const |
| bool | isPointerConversionToVoidPointer (ASTContext &Context) const |
| void | DebugPrint () const |
Public Attributes | |
| ImplicitConversionKind | First: 8 |
| ImplicitConversionKind | Second: 8 |
| ImplicitConversionKind | Third: 8 |
| Third - The third conversion can be a qualification conversion. | |
| bool | DeprecatedStringLiteralToCharPtr: 1 |
| bool | IncompatibleObjC: 1 |
| bool | ReferenceBinding: 1 |
| bool | DirectBinding: 1 |
| bool | RRefBinding: 1 |
| void * | FromTypePtr |
| void * | ToTypePtrs [3] |
| CXXConstructorDecl * | CopyConstructor |
StandardConversionSequence - represents a standard conversion sequence (C++ 13.3.3.1.1). A standard conversion sequence contains between zero and three conversions. If a particular conversion is not needed, it will be set to the identity conversion (ICK_Identity). Note that the three conversions are specified as separate members (rather than in an array) so that we can keep the size of a standard conversion sequence to a single word.
Definition at line 107 of file Overload.h.
| void clang::StandardConversionSequence::DebugPrint | ( | ) | const |
DebugPrint - Print this standard conversion sequence to standard error. Useful for debugging overloading issues.
Definition at line 194 of file SemaOverload.cpp.
References CopyConstructor, DirectBinding, First, clang::GetImplicitConversionName(), clang::ICK_Identity, ReferenceBinding, Second, and Third.
Referenced by clang::ImplicitConversionSequence::DebugPrint(), and clang::UserDefinedConversionSequence::DebugPrint().
| QualType clang::StandardConversionSequence::getFromType | ( | ) | const [inline] |
Definition at line 171 of file Overload.h.
References FromTypePtr, and clang::QualType::getFromOpaquePtr().
Referenced by clang::Sema::CompareDerivedToBaseConversions(), clang::Sema::CompareStandardConversionSequences(), isPointerConversionToBool(), and isPointerConversionToVoidPointer().
| ImplicitConversionRank clang::StandardConversionSequence::getRank | ( | ) | const |
getRank - Retrieve the rank of this standard conversion sequence (C++ 13.3.3.1.1p3). The rank is the largest rank of each of the implicit conversions.
Definition at line 139 of file SemaOverload.cpp.
References First, clang::GetConversionRank(), clang::ICR_Exact_Match, Second, and Third.
Referenced by clang::Sema::CompareStandardConversionSequences().
| QualType clang::StandardConversionSequence::getToType | ( | unsigned | Idx | ) | const [inline] |
Definition at line 174 of file Overload.h.
References clang::QualType::getFromOpaquePtr(), and ToTypePtrs.
Referenced by clang::Sema::CompareDerivedToBaseConversions(), clang::Sema::CompareQualificationConversions(), clang::Sema::CompareStandardConversionSequences(), clang::compareStandardConversionSubsets(), isPointerConversionToBool(), isPointerConversionToVoidPointer(), and TryRefInitWithConversionFunction().
| bool clang::StandardConversionSequence::isIdentityConversion | ( | ) | const [inline] |
Definition at line 181 of file Overload.h.
References First, clang::ICK_Identity, Second, and Third.
Referenced by clang::compareStandardConversionSubsets().
| bool clang::StandardConversionSequence::isPointerConversionToBool | ( | ) | const |
isPointerConversionToBool - Determines whether this conversion is a conversion of a pointer or pointer-to-member to bool. This is used as part of the ranking of standard conversion sequences (C++ 13.3.3.2p4).
Definition at line 154 of file SemaOverload.cpp.
References First, getFromType(), getToType(), clang::ICK_Array_To_Pointer, and clang::ICK_Function_To_Pointer.
Referenced by clang::Sema::CompareStandardConversionSequences().
| bool clang::StandardConversionSequence::isPointerConversionToVoidPointer | ( | ASTContext & | Context | ) | const |
isPointerConversionToVoidPointer - Determines whether this conversion is a conversion of a pointer to a void pointer. This is used as part of the ranking of standard conversion sequences (C++ 13.3.3.2p4).
Definition at line 175 of file SemaOverload.cpp.
References First, clang::ASTContext::getArrayDecayedType(), getFromType(), getToType(), clang::ICK_Array_To_Pointer, clang::ICK_Pointer_Conversion, and Second.
Referenced by clang::Sema::CompareStandardConversionSequences().
| void clang::StandardConversionSequence::setAllToTypes | ( | QualType | T | ) | [inline] |
Definition at line 165 of file Overload.h.
References clang::QualType::getAsOpaquePtr(), and ToTypePtrs.
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::IsStandardConversion(), clang::Sema::IsUserDefinedConversion(), clang::Sema::TryImplicitConversion(), and clang::Sema::TryObjectArgumentInitialization().
| void clang::StandardConversionSequence::setAsIdentityConversion | ( | ) |
StandardConversionSequence - Set the standard conversion sequence to the identity conversion.
Definition at line 125 of file SemaOverload.cpp.
References CopyConstructor, DeprecatedStringLiteralToCharPtr, DirectBinding, First, clang::ICK_Identity, ReferenceBinding, RRefBinding, Second, and Third.
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::IsStandardConversion(), clang::Sema::IsUserDefinedConversion(), clang::Sema::TryImplicitConversion(), and clang::Sema::TryObjectArgumentInitialization().
| void clang::StandardConversionSequence::setFromType | ( | QualType | T | ) | [inline] |
Definition at line 160 of file Overload.h.
References FromTypePtr, and clang::QualType::getAsOpaquePtr().
Referenced by clang::Sema::AddConversionCandidate(), clang::Sema::IsStandardConversion(), clang::Sema::IsUserDefinedConversion(), clang::Sema::TryImplicitConversion(), and clang::Sema::TryObjectArgumentInitialization().
| void clang::StandardConversionSequence::setToType | ( | unsigned | Idx, | |
| QualType | T | |||
| ) | [inline] |
Definition at line 161 of file Overload.h.
References clang::QualType::getAsOpaquePtr(), and ToTypePtrs.
Referenced by clang::Sema::IsStandardConversion().
CopyConstructor - The copy constructor that is used to perform this conversion, when the conversion is actually just the initialization of an object via copy constructor. Such conversions are either identity conversions or derived-to-base conversions.
Definition at line 158 of file Overload.h.
Referenced by DebugPrint(), clang::Sema::IsStandardConversion(), clang::Sema::PerformImplicitConversion(), setAsIdentityConversion(), and clang::Sema::TryImplicitConversion().
Deprecated - Whether this the deprecated conversion of a string literal to a pointer to non-const character data (C++ 4.2p2).
Definition at line 125 of file Overload.h.
Referenced by clang::Sema::CompareQualificationConversions(), clang::Sema::IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and setAsIdentityConversion().
DirectBinding - True when this is a reference binding that is a direct binding (C++ [dcl.init.ref]).
Definition at line 137 of file Overload.h.
Referenced by DebugPrint(), clang::FindConversionForRefInit(), setAsIdentityConversion(), and clang::Sema::TryObjectArgumentInitialization().
First -- The first conversion can be an lvalue-to-rvalue conversion, array-to-pointer conversion, or function-to-pointer conversion.
Definition at line 111 of file Overload.h.
Referenced by clang::Sema::CompareDerivedToBaseConversions(), clang::Sema::CompareQualificationConversions(), clang::Sema::CompareStandardConversionSequences(), clang::UserDefinedConversionSequence::DebugPrint(), DebugPrint(), getRank(), isIdentityConversion(), isPointerConversionToBool(), isPointerConversionToVoidPointer(), clang::Sema::IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and setAsIdentityConversion().
FromType - The type that this conversion is converting from. This is an opaque pointer that can be translated into a QualType.
Definition at line 146 of file Overload.h.
Referenced by getFromType(), and setFromType().
IncompatibleObjC - Whether this is an Objective-C conversion that we should warn about (if we actually use it).
Definition at line 129 of file Overload.h.
Referenced by clang::Sema::IsStandardConversion(), and clang::Sema::PerformImplicitConversion().
ReferenceBinding - True when this is a reference binding (C++ [over.ics.ref]).
Definition at line 133 of file Overload.h.
Referenced by clang::Sema::CompareStandardConversionSequences(), clang::compareStandardConversionSubsets(), DebugPrint(), clang::FindConversionForRefInit(), setAsIdentityConversion(), and clang::Sema::TryObjectArgumentInitialization().
RRefBinding - True when this is a reference binding of an rvalue reference to an rvalue (C++0x [over.ics.rank]p3b4).
Definition at line 141 of file Overload.h.
Referenced by clang::Sema::CompareStandardConversionSequences(), setAsIdentityConversion(), and clang::Sema::TryObjectArgumentInitialization().
Second - The second conversion can be an integral promotion, floating point promotion, integral conversion, floating point conversion, floating-integral conversion, pointer conversion, pointer-to-member conversion, or boolean conversion.
Definition at line 117 of file Overload.h.
Referenced by clang::Sema::CompareDerivedToBaseConversions(), clang::Sema::CompareQualificationConversions(), clang::compareStandardConversionSubsets(), clang::UserDefinedConversionSequence::DebugPrint(), DebugPrint(), getRank(), isIdentityConversion(), isPointerConversionToVoidPointer(), clang::Sema::IsStandardConversion(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformObjectArgumentInitialization(), setAsIdentityConversion(), clang::Sema::TryImplicitConversion(), and clang::Sema::TryObjectArgumentInitialization().
Third - The third conversion can be a qualification conversion.
Definition at line 120 of file Overload.h.
Referenced by clang::Sema::CompareQualificationConversions(), clang::compareStandardConversionSubsets(), clang::UserDefinedConversionSequence::DebugPrint(), DebugPrint(), getRank(), isIdentityConversion(), clang::Sema::IsStandardConversion(), clang::Sema::PerformImplicitConversion(), and setAsIdentityConversion().
ToType - The types that this conversion is converting to in each step. This is an opaque pointer that can be translated into a QualType.
Definition at line 151 of file Overload.h.
Referenced by getToType(), setAllToTypes(), and setToType().