clang 20.0.0git
|
Describes the sequence of initializations required to initialize a given object or reference with a set of arguments. More...
#include "clang/Sema/Initialization.h"
Classes | |
class | Step |
A single step in the initialization sequence. More... | |
Public Member Functions | |
void | SetZeroInitializationFixit (const std::string &Fixit, SourceLocation L) |
Call for initializations are invalid but that would be valid zero initialzations if Fixit was applied. | |
InitializationSequence (Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, bool TopLevelOfInitList=false, bool TreatUnavailableAsInvalid=true) | |
Try to perform initialization of the given entity, creating a record of the steps required to perform the initialization. | |
void | InitializeFrom (Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, bool TopLevelOfInitList, bool TreatUnavailableAsInvalid) |
~InitializationSequence () | |
ExprResult | Perform (Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, MultiExprArg Args, QualType *ResultType=nullptr) |
Perform the actual initialization of the given entity based on the computed initialization sequence. | |
bool | Diagnose (Sema &S, const InitializedEntity &Entity, const InitializationKind &Kind, ArrayRef< Expr * > Args) |
Diagnose an potentially-invalid initialization sequence. | |
enum SequenceKind | getKind () const |
Determine the kind of initialization sequence computed. | |
void | setSequenceKind (enum SequenceKind SK) |
Set the kind of sequence computed. | |
operator bool () const | |
Determine whether the initialization sequence is valid. | |
bool | Failed () const |
Determine whether the initialization sequence is invalid. | |
step_iterator | step_begin () const |
step_iterator | step_end () const |
step_range | steps () const |
bool | isDirectReferenceBinding () const |
Determine whether this initialization is a direct reference binding (C++ [dcl.init.ref]). | |
bool | isAmbiguous () const |
Determine whether this initialization failed due to an ambiguity. | |
bool | isConstructorInitialization () const |
Determine whether this initialization is direct call to a constructor. | |
void | AddAddressOverloadResolutionStep (FunctionDecl *Function, DeclAccessPair Found, bool HadMultipleCandidates) |
Add a new step in the initialization that resolves the address of an overloaded function to a specific function declaration. | |
void | AddDerivedToBaseCastStep (QualType BaseType, ExprValueKind Category) |
Add a new step in the initialization that performs a derived-to- base cast. | |
void | AddReferenceBindingStep (QualType T, bool BindingTemporary) |
Add a new step binding a reference to an object. | |
void | AddExtraneousCopyToTemporary (QualType T) |
Add a new step that makes an extraneous copy of the input to a temporary of the same class type. | |
void | AddFinalCopy (QualType T) |
Add a new step that makes a copy of the input to an object of the given type, as the final step in class copy-initialization. | |
void | AddUserConversionStep (FunctionDecl *Function, DeclAccessPair FoundDecl, QualType T, bool HadMultipleCandidates) |
Add a new step invoking a conversion function, which is either a constructor or a conversion function. | |
void | AddQualificationConversionStep (QualType Ty, ExprValueKind Category) |
Add a new step that performs a qualification conversion to the given type. | |
void | AddFunctionReferenceConversionStep (QualType Ty) |
Add a new step that performs a function reference conversion to the given type. | |
void | AddAtomicConversionStep (QualType Ty) |
Add a new step that performs conversion from non-atomic to atomic type. | |
void | AddConversionSequenceStep (const ImplicitConversionSequence &ICS, QualType T, bool TopLevelOfInitList=false) |
Add a new step that applies an implicit conversion sequence. | |
void | AddListInitializationStep (QualType T) |
Add a list-initialization step. | |
void | AddConstructorInitializationStep (DeclAccessPair FoundDecl, CXXConstructorDecl *Constructor, QualType T, bool HadMultipleCandidates, bool FromInitList, bool AsInitList) |
Add a constructor-initialization step. | |
void | AddZeroInitializationStep (QualType T) |
Add a zero-initialization step. | |
void | AddCAssignmentStep (QualType T) |
Add a C assignment step. | |
void | AddStringInitStep (QualType T) |
Add a string init step. | |
void | AddObjCObjectConversionStep (QualType T) |
Add an Objective-C object conversion step, which is always a no-op. | |
void | AddArrayInitLoopStep (QualType T, QualType EltTy) |
Add an array initialization loop step. | |
void | AddArrayInitStep (QualType T, bool IsGNUExtension) |
Add an array initialization step. | |
void | AddParenthesizedArrayInitStep (QualType T) |
Add a parenthesized array initialization step. | |
void | AddPassByIndirectCopyRestoreStep (QualType T, bool shouldCopy) |
Add a step to pass an object by indirect copy-restore. | |
void | AddProduceObjCObjectStep (QualType T) |
Add a step to "produce" an Objective-C object (by retaining it). | |
void | AddStdInitializerListConstructionStep (QualType T) |
Add a step to construct a std::initializer_list object from an initializer list. | |
void | AddOCLSamplerInitStep (QualType T) |
Add a step to initialize an OpenCL sampler from an integer constant. | |
void | AddOCLZeroOpaqueTypeStep (QualType T) |
Add a step to initialzie an OpenCL opaque type (event_t, queue_t, etc.) from a zero constant. | |
void | AddParenthesizedListInitStep (QualType T) |
void | AddUnwrapInitListInitStep (InitListExpr *Syntactic) |
Only used when initializing structured bindings from an array with direct-list-initialization. | |
void | RewrapReferenceInitList (QualType T, InitListExpr *Syntactic) |
Add steps to unwrap a initializer list for a reference around a single element and rewrap it at the end. | |
void | SetFailed (FailureKind Failure) |
Note that this initialization sequence failed. | |
void | SetOverloadFailure (FailureKind Failure, OverloadingResult Result) |
Note that this initialization sequence failed due to failed overload resolution. | |
OverloadCandidateSet & | getFailedCandidateSet () |
Retrieve a reference to the candidate set when overload resolution fails. | |
OverloadingResult | getFailedOverloadResult () const |
Get the overloading result, for when the initialization sequence failed due to a bad overload. | |
void | setIncompleteTypeFailure (QualType IncompleteType) |
Note that this initialization sequence failed due to an incomplete type. | |
FailureKind | getFailureKind () const |
Determine why initialization failed. | |
void | dump (raw_ostream &OS) const |
Dump a representation of this initialization sequence to the given stream, for debugging purposes. | |
void | dump () const |
Dump a representation of this initialization sequence to standard error, for debugging purposes. | |
Describes the sequence of initializations required to initialize a given object or reference with a set of arguments.
Definition at line 802 of file Initialization.h.
using clang::InitializationSequence::step_iterator = SmallVectorImpl<Step>::const_iterator |
Definition at line 1240 of file Initialization.h.
using clang::InitializationSequence::step_range = llvm::iterator_range<step_iterator> |
Definition at line 1245 of file Initialization.h.
Describes why initialization failed.
Definition at line 996 of file Initialization.h.
Describes the kind of initialization sequence computed.
Definition at line 805 of file Initialization.h.
Describes the kind of a particular step in an initialization sequence.
Enumerator | |
---|---|
SK_ResolveAddressOfOverloadedFunction | Resolve the address of an overloaded function to a specific function declaration. |
SK_CastDerivedToBasePRValue | Perform a derived-to-base cast, producing an rvalue. |
SK_CastDerivedToBaseXValue | Perform a derived-to-base cast, producing an xvalue. |
SK_CastDerivedToBaseLValue | Perform a derived-to-base cast, producing an lvalue. |
SK_BindReference | Reference binding to an lvalue. |
SK_BindReferenceToTemporary | Reference binding to a temporary. |
SK_ExtraneousCopyToTemporary | An optional copy of a temporary object to another temporary object, which is permitted (but not required) by C++98/03 but not C++0x. |
SK_FinalCopy | Direct-initialization from a reference-related object in the final stage of class copy-initialization. |
SK_UserConversion | Perform a user-defined conversion, either via a conversion function or via a constructor. |
SK_QualificationConversionPRValue | Perform a qualification conversion, producing a prvalue. |
SK_QualificationConversionXValue | Perform a qualification conversion, producing an xvalue. |
SK_QualificationConversionLValue | Perform a qualification conversion, producing an lvalue. |
SK_FunctionReferenceConversion | Perform a function reference conversion, see [dcl.init.ref]p4. |
SK_AtomicConversion | Perform a conversion adding _Atomic to a type. |
SK_ConversionSequence | Perform an implicit conversion sequence. |
SK_ConversionSequenceNoNarrowing | Perform an implicit conversion sequence without narrowing. |
SK_ListInitialization | Perform list-initialization without a constructor. |
SK_UnwrapInitList | Unwrap the single-element initializer list for a reference. |
SK_RewrapInitList | Rewrap the single-element initializer list for a reference. |
SK_ConstructorInitialization | Perform initialization via a constructor. |
SK_ConstructorInitializationFromList | Perform initialization via a constructor, taking arguments from a single InitListExpr. |
SK_ZeroInitialization | Zero-initialize the object. |
SK_CAssignment | C assignment. |
SK_StringInit | Initialization by string. |
SK_ObjCObjectConversion | An initialization that "converts" an Objective-C object (not a point to an object) to another Objective-C object type. |
SK_ArrayLoopIndex | Array indexing for initialization by elementwise copy. |
SK_ArrayLoopInit | Array initialization by elementwise copy. |
SK_ArrayInit | Array initialization (from an array rvalue). |
SK_GNUArrayInit | Array initialization (from an array rvalue) as a GNU extension. |
SK_ParenthesizedArrayInit | Array initialization from a parenthesized initializer list. This is a GNU C++ extension. |
SK_PassByIndirectCopyRestore | Pass an object by indirect copy-and-restore. |
SK_PassByIndirectRestore | Pass an object by indirect restore. |
SK_ProduceObjCObject | Produce an Objective-C object pointer. |
SK_StdInitializerList | Construct a std::initializer_list from an initializer list. |
SK_StdInitializerListConstructorCall | Perform initialization via a constructor taking a single std::initializer_list argument. |
SK_OCLSamplerInit | Initialize an OpenCL sampler from an integer. |
SK_OCLZeroOpaqueType | Initialize an opaque OpenCL type (event_t, queue_t, etc.) with zero. |
SK_ParenthesizedListInit | Initialize an aggreagate with parenthesized list of values. This is a C++20 feature. |
Definition at line 821 of file Initialization.h.
InitializationSequence::InitializationSequence | ( | Sema & | S, |
const InitializedEntity & | Entity, | ||
const InitializationKind & | Kind, | ||
MultiExprArg | Args, | ||
bool | TopLevelOfInitList = false , |
||
bool | TreatUnavailableAsInvalid = true |
||
) |
Try to perform initialization of the given entity, creating a record of the steps required to perform the initialization.
The generated initialization sequence will either contain enough information to diagnose
S | the semantic analysis object. |
Entity | the entity being initialized. |
Kind | the kind of initialization being performed. |
Args | the argument(s) provided for initialization. |
TopLevelOfInitList | true if we are initializing from an expression at the top level inside an initializer list. This disallows narrowing conversions in C++11 onwards. |
TreatUnavailableAsInvalid | true if we want to treat unavailable as invalid. |
Definition at line 6344 of file SemaInit.cpp.
References InitializeFrom().
InitializationSequence::~InitializationSequence | ( | ) |
Definition at line 6812 of file SemaInit.cpp.
void InitializationSequence::AddAddressOverloadResolutionStep | ( | FunctionDecl * | Function, |
DeclAccessPair | Found, | ||
bool | HadMultipleCandidates | ||
) |
Add a new step in the initialization that resolves the address of an overloaded function to a specific function declaration.
Function | the function to which the overloaded function reference resolves. |
Definition at line 3884 of file SemaInit.cpp.
References clang::Found, clang::Function, and SK_ResolveAddressOfOverloadedFunction.
Referenced by ResolveOverloadedFunctionForReferenceBinding().
Add an array initialization loop step.
Definition at line 4047 of file SemaInit.cpp.
References SK_ArrayLoopIndex, SK_ArrayLoopInit, and clang::T.
Referenced by TryArrayCopy().
Add an array initialization step.
Definition at line 4040 of file SemaInit.cpp.
References SK_ArrayInit, SK_GNUArrayInit, and clang::T.
Referenced by InitializeFrom(), and TryArrayCopy().
void InitializationSequence::AddAtomicConversionStep | ( | QualType | Ty | ) |
Add a new step that performs conversion from non-atomic to atomic type.
Definition at line 3973 of file SemaInit.cpp.
References SK_AtomicConversion.
Referenced by InitializeFrom().
void InitializationSequence::AddCAssignmentStep | ( | QualType | T | ) |
Add a C assignment step.
Definition at line 4019 of file SemaInit.cpp.
References SK_CAssignment, and clang::T.
Referenced by InitializeFrom().
void InitializationSequence::AddConstructorInitializationStep | ( | DeclAccessPair | FoundDecl, |
CXXConstructorDecl * | Constructor, | ||
QualType | T, | ||
bool | HadMultipleCandidates, | ||
bool | FromInitList, | ||
bool | AsInitList | ||
) |
Add a constructor-initialization step.
FromInitList | The constructor call is syntactically an initializer list. |
AsInitList | The constructor is called as an init list constructor. |
Definition at line 3998 of file SemaInit.cpp.
References SK_ConstructorInitialization, SK_ConstructorInitializationFromList, SK_StdInitializerListConstructorCall, and clang::T.
Referenced by TryConstructorInitialization().
void InitializationSequence::AddConversionSequenceStep | ( | const ImplicitConversionSequence & | ICS, |
QualType | T, | ||
bool | TopLevelOfInitList = false |
||
) |
Add a new step that applies an implicit conversion sequence.
Definition at line 3980 of file SemaInit.cpp.
References SK_ConversionSequence, SK_ConversionSequenceNoNarrowing, and clang::T.
Referenced by InitializeFrom(), TryListInitialization(), tryObjCWritebackConversion(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
void InitializationSequence::AddDerivedToBaseCastStep | ( | QualType | BaseType, |
ExprValueKind | Category | ||
) |
Add a new step in the initialization that performs a derived-to- base cast.
BaseType | the base type to which we will be casting. |
Category | Indicates whether the result will be treated as an rvalue, an xvalue, or an lvalue. |
Definition at line 3897 of file SemaInit.cpp.
References SK_CastDerivedToBaseLValue, SK_CastDerivedToBasePRValue, SK_CastDerivedToBaseXValue, clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.
Referenced by TryReferenceInitializationCore(), and TryRefInitWithConversionFunction().
void InitializationSequence::AddExtraneousCopyToTemporary | ( | QualType | T | ) |
Add a new step that makes an extraneous copy of the input to a temporary of the same class type.
This extraneous copy only occurs during reference binding in C++98/03, where we are permitted (but not required) to introduce an extra copy. At a bare minimum, we must check that we could call the copy constructor, and produce a diagnostic if the copy constructor is inaccessible or no copy constructor matches.
T | The type of the temporary being created. |
Definition at line 3926 of file SemaInit.cpp.
References SK_ExtraneousCopyToTemporary, and clang::T.
Referenced by TryReferenceInitializationCore().
void InitializationSequence::AddFinalCopy | ( | QualType | T | ) |
Add a new step that makes a copy of the input to an object of the given type, as the final step in class copy-initialization.
Definition at line 3919 of file SemaInit.cpp.
References SK_FinalCopy, and clang::T.
Referenced by TryUserDefinedConversion().
void InitializationSequence::AddFunctionReferenceConversionStep | ( | QualType | Ty | ) |
Add a new step that performs a function reference conversion to the given type.
Definition at line 3966 of file SemaInit.cpp.
References SK_FunctionReferenceConversion.
Referenced by TryReferenceInitializationCore(), and TryRefInitWithConversionFunction().
void InitializationSequence::AddListInitializationStep | ( | QualType | T | ) |
Add a list-initialization step.
Definition at line 3991 of file SemaInit.cpp.
References SK_ListInitialization, and clang::T.
Referenced by InitializeFrom(), and TryListInitialization().
void InitializationSequence::AddObjCObjectConversionStep | ( | QualType | T | ) |
Add an Objective-C object conversion step, which is always a no-op.
Definition at line 4033 of file SemaInit.cpp.
References SK_ObjCObjectConversion, and clang::T.
Referenced by TryReferenceInitializationCore(), and TryRefInitWithConversionFunction().
void InitializationSequence::AddOCLSamplerInitStep | ( | QualType | T | ) |
Add a step to initialize an OpenCL sampler from an integer constant.
Definition at line 4088 of file SemaInit.cpp.
References SK_OCLSamplerInit, and clang::T.
Referenced by TryOCLSamplerInitialization().
void InitializationSequence::AddOCLZeroOpaqueTypeStep | ( | QualType | T | ) |
Add a step to initialzie an OpenCL opaque type (event_t, queue_t, etc.) from a zero constant.
Definition at line 4095 of file SemaInit.cpp.
References SK_OCLZeroOpaqueType, and clang::T.
Referenced by TryOCLZeroOpaqueTypeInitialization().
void InitializationSequence::AddParenthesizedArrayInitStep | ( | QualType | T | ) |
Add a parenthesized array initialization step.
Definition at line 4058 of file SemaInit.cpp.
References SK_ParenthesizedArrayInit, and clang::T.
Referenced by InitializeFrom().
void InitializationSequence::AddParenthesizedListInitStep | ( | QualType | T | ) |
Definition at line 4102 of file SemaInit.cpp.
References SK_ParenthesizedListInit, and clang::T.
Referenced by TryOrBuildParenListInitialization().
Add a step to pass an object by indirect copy-restore.
Definition at line 4065 of file SemaInit.cpp.
References s, SK_PassByIndirectCopyRestore, SK_PassByIndirectRestore, and clang::ast_matchers::type.
Referenced by InitializeFrom(), and tryObjCWritebackConversion().
void InitializationSequence::AddProduceObjCObjectStep | ( | QualType | T | ) |
Add a step to "produce" an Objective-C object (by retaining it).
Definition at line 4074 of file SemaInit.cpp.
References SK_ProduceObjCObject, and clang::T.
Referenced by MaybeProduceObjCObject().
void InitializationSequence::AddQualificationConversionStep | ( | QualType | Ty, |
ExprValueKind | Category | ||
) |
Add a new step that performs a qualification conversion to the given type.
Definition at line 3947 of file SemaInit.cpp.
References SK_QualificationConversionLValue, SK_QualificationConversionPRValue, SK_QualificationConversionXValue, clang::VK_LValue, clang::VK_PRValue, and clang::VK_XValue.
Referenced by TryConstructorInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
Add a new step binding a reference to an object.
BindingTemporary | True if we are binding a reference to a temporary object (thereby extending its lifetime); false if we are binding to an lvalue or an lvalue treated as an rvalue. |
Definition at line 3911 of file SemaInit.cpp.
References SK_BindReference, SK_BindReferenceToTemporary, and clang::T.
Referenced by TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryRefInitWithConversionFunction().
void InitializationSequence::AddStdInitializerListConstructionStep | ( | QualType | T | ) |
Add a step to construct a std::initializer_list object from an initializer list.
Definition at line 4081 of file SemaInit.cpp.
References SK_StdInitializerList, and clang::T.
Referenced by TryInitializerListConstruction().
void InitializationSequence::AddStringInitStep | ( | QualType | T | ) |
Add a string init step.
Definition at line 4026 of file SemaInit.cpp.
References SK_StringInit, and clang::T.
Referenced by TryStringLiteralInitialization().
void InitializationSequence::AddUnwrapInitListInitStep | ( | InitListExpr * | Syntactic | ) |
Only used when initializing structured bindings from an array with direct-list-initialization.
Unwrap the initializer list to get the array for array copy.
Definition at line 4109 of file SemaInit.cpp.
References clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), clang::Expr::getType(), and SK_UnwrapInitList.
Referenced by TryListInitialization().
void InitializationSequence::AddUserConversionStep | ( | FunctionDecl * | Function, |
DeclAccessPair | FoundDecl, | ||
QualType | T, | ||
bool | HadMultipleCandidates | ||
) |
Add a new step invoking a conversion function, which is either a constructor or a conversion function.
Definition at line 3934 of file SemaInit.cpp.
References clang::Function, SK_UserConversion, and clang::T.
Referenced by TryConstructorInitialization(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
void InitializationSequence::AddZeroInitializationStep | ( | QualType | T | ) |
Add a zero-initialization step.
Definition at line 4012 of file SemaInit.cpp.
References SK_ZeroInitialization, and clang::T.
Referenced by InitializeFrom(), maybeRecoverWithZeroInitialization(), TryDefaultInitialization(), and TryValueInitialization().
bool InitializationSequence::Diagnose | ( | Sema & | S, |
const InitializedEntity & | Entity, | ||
const InitializationKind & | Kind, | ||
ArrayRef< Expr * > | Args | ||
) |
Diagnose an potentially-invalid initialization sequence.
Definition at line 8672 of file SemaInit.cpp.
References clang::OverloadCandidateSet::BestViableFunction(), clang::Type::castAs(), clang::Sema::checkAddressOfFunctionIsAvailable(), clang::OverloadCandidateSet::CompleteCandidates(), clang::Sema::Context, clang::FixItHint::CreateInsertion(), clang::Sema::CurContext, clang::SemaBase::Diag(), diagnoseListInit(), DiagnoseUninitializedReference(), clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_Member, clang::InitializedEntity::EK_ParenAggInitMember, clang::InitializedEntity::EK_Result, emitBadConversionNotes(), Failed(), clang::Sema::FixOverloadedFunctionReference(), FK_AddressOfOverloadFailed, FK_AddressOfUnaddressableFunction, FK_ArrayNeedsInitList, FK_ArrayNeedsInitListOrStringLiteral, FK_ArrayNeedsInitListOrWideStringLiteral, FK_ArrayTypeMismatch, FK_ConstructorOverloadFailed, FK_ConversionFailed, FK_ConversionFromPropertyFailed, FK_DefaultInitOfConst, FK_DesignatedInitForNonAggregate, FK_ExplicitConstructor, FK_IncompatWideStringIntoWideChar, FK_Incomplete, FK_InitListBadDestinationType, FK_ListConstructorOverloadFailed, FK_ListInitializationFailed, FK_NarrowStringIntoWideCharArray, FK_NonConstantArrayInit, FK_NonConstLValueReferenceBindingToBitfield, FK_NonConstLValueReferenceBindingToMatrixElement, FK_NonConstLValueReferenceBindingToTemporary, FK_NonConstLValueReferenceBindingToUnrelated, FK_NonConstLValueReferenceBindingToVectorElement, FK_ParenthesizedListInitFailed, FK_ParenthesizedListInitForReference, FK_ParenthesizedListInitForScalar, FK_PlaceholderType, FK_PlainStringIntoUTF8Char, FK_ReferenceAddrspaceMismatchTemporary, FK_ReferenceBindingToInitList, FK_ReferenceInitDropsQualifiers, FK_ReferenceInitFailed, FK_ReferenceInitOverloadFailed, FK_RValueReferenceBindingToLValue, FK_TooManyInitsForReference, FK_TooManyInitsForScalar, FK_UserConversionOverloadFailed, FK_UTF8StringIntoPlainChar, FK_VariableLengthArrayHasInitializer, FK_WideStringIntoCharArray, clang::Found, clang::Qualifiers::fromCVRMask(), clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::Sema::getASTContext(), clang::InitializedEntity::getBaseSpecifier(), clang::SourceRange::getBegin(), clang::Stmt::getBeginLoc(), clang::Qualifiers::getCVRQualifiers(), clang::InitializedEntity::getDecl(), clang::NamedDecl::getDeclName(), clang::InitListExpr::getInits(), clang::InitializedEntity::getKind(), clang::Sema::getLangOpts(), clang::Decl::getLocation(), clang::Sema::getLocForEndOfToken(), clang::InitializedEntity::getName(), clang::QualType::getNonReferenceType(), clang::InitListExpr::getNumInits(), clang::QualType::getQualifiers(), clang::Stmt::getSourceRange(), clang::Sema::getSpecialMember(), clang::StringLiteral::getString(), clang::ASTContext::getTagDeclType(), clang::CXXBaseSpecifier::getType(), clang::Expr::getType(), clang::InitializedEntity::getType(), clang::ASTContext::getTypeDeclType(), clang::Sema::HandleFunctionTypeMismatch(), clang::Qualifiers::hasQualifiers(), clang::InitializationKind::IK_Default, clang::InitializationKind::IK_Value, int, clang::Qualifiers::isAddressSpaceSupersetOf(), clang::Sema::isImplicitlyDeleted(), clang::Type::isIncompleteType(), clang::Expr::isLValue(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isSignedIntegerType(), clang::QualType::isVolatileQualified(), clang::OverloadCandidateSet::NoteCandidates(), clang::Sema::NoteDeletedFunction(), clang::OCD_AllCandidates, clang::OCD_AmbiguousCandidates, clang::OR_Ambiguous, clang::OR_Deleted, clang::OR_No_Viable_Function, clang::OR_Success, clang::ASTContext::OverloadTy, clang::SemaBase::PDiag(), clang::Sema::RequireCompleteType(), clang::Sema::ResolveAddressOfOverloadedFunction(), clang::SourceRange::setBegin(), and TryOrBuildParenListInitialization().
Referenced by Perform(), TryClassUnification(), and TryOrBuildParenListInitialization().
void InitializationSequence::dump | ( | ) | const |
Dump a representation of this initialization sequence to standard error, for debugging purposes.
Definition at line 9528 of file SemaInit.cpp.
References dump().
Referenced by dump().
void InitializationSequence::dump | ( | raw_ostream & | OS | ) | const |
Dump a representation of this initialization sequence to the given stream, for debugging purposes.
Definition at line 9178 of file SemaInit.cpp.
References DependentSequence, FailedSequence, FK_AddressOfOverloadFailed, FK_AddressOfUnaddressableFunction, FK_ArrayNeedsInitList, FK_ArrayNeedsInitListOrStringLiteral, FK_ArrayNeedsInitListOrWideStringLiteral, FK_ArrayTypeMismatch, FK_ConstructorOverloadFailed, FK_ConversionFailed, FK_ConversionFromPropertyFailed, FK_DefaultInitOfConst, FK_DesignatedInitForNonAggregate, FK_ExplicitConstructor, FK_IncompatWideStringIntoWideChar, FK_Incomplete, FK_InitListBadDestinationType, FK_ListConstructorOverloadFailed, FK_ListInitializationFailed, FK_NarrowStringIntoWideCharArray, FK_NonConstantArrayInit, FK_NonConstLValueReferenceBindingToBitfield, FK_NonConstLValueReferenceBindingToMatrixElement, FK_NonConstLValueReferenceBindingToTemporary, FK_NonConstLValueReferenceBindingToUnrelated, FK_NonConstLValueReferenceBindingToVectorElement, FK_ParenthesizedListInitFailed, FK_ParenthesizedListInitForReference, FK_ParenthesizedListInitForScalar, FK_PlaceholderType, FK_PlainStringIntoUTF8Char, FK_ReferenceAddrspaceMismatchTemporary, FK_ReferenceBindingToInitList, FK_ReferenceInitDropsQualifiers, FK_ReferenceInitFailed, FK_ReferenceInitOverloadFailed, FK_RValueReferenceBindingToLValue, FK_TooManyInitsForReference, FK_TooManyInitsForScalar, FK_UserConversionOverloadFailed, FK_UTF8StringIntoPlainChar, FK_VariableLengthArrayHasInitializer, FK_WideStringIntoCharArray, NormalSequence, SK_ArrayInit, SK_ArrayLoopIndex, SK_ArrayLoopInit, SK_AtomicConversion, SK_BindReference, SK_BindReferenceToTemporary, SK_CAssignment, SK_CastDerivedToBaseLValue, SK_CastDerivedToBasePRValue, SK_CastDerivedToBaseXValue, SK_ConstructorInitialization, SK_ConstructorInitializationFromList, SK_ConversionSequence, SK_ConversionSequenceNoNarrowing, SK_ExtraneousCopyToTemporary, SK_FinalCopy, SK_FunctionReferenceConversion, SK_GNUArrayInit, SK_ListInitialization, SK_ObjCObjectConversion, SK_OCLSamplerInit, SK_OCLZeroOpaqueType, SK_ParenthesizedArrayInit, SK_ParenthesizedListInit, SK_PassByIndirectCopyRestore, SK_PassByIndirectRestore, SK_ProduceObjCObject, SK_QualificationConversionLValue, SK_QualificationConversionPRValue, SK_QualificationConversionXValue, SK_ResolveAddressOfOverloadedFunction, SK_RewrapInitList, SK_StdInitializerList, SK_StdInitializerListConstructorCall, SK_StringInit, SK_UnwrapInitList, SK_UserConversion, SK_ZeroInitialization, step_begin(), and step_end().
|
inline |
Determine whether the initialization sequence is invalid.
Definition at line 1238 of file Initialization.h.
References FailedSequence.
Referenced by Diagnose(), getFailureKind(), InitializeFrom(), isAmbiguous(), operator bool(), Perform(), TryClassUnification(), tryDiagnoseOverloadedCast(), TryOrBuildParenListInitialization(), and TryStaticImplicitCast().
|
inline |
Retrieve a reference to the candidate set when overload resolution fails.
Definition at line 1410 of file Initialization.h.
Referenced by InitializeFrom(), TryConstructorInitialization(), tryDiagnoseOverloadedCast(), TryReferenceInitializationCore(), TryRefInitWithConversionFunction(), and TryUserDefinedConversion().
|
inline |
Get the overloading result, for when the initialization sequence failed due to a bad overload.
Definition at line 1416 of file Initialization.h.
Referenced by tryDiagnoseOverloadedCast().
|
inline |
Determine why initialization failed.
Definition at line 1428 of file Initialization.h.
References Failed().
Referenced by InitializeFrom(), isAmbiguous(), and tryDiagnoseOverloadedCast().
|
inline |
Determine the kind of initialization sequence computed.
Definition at line 1229 of file Initialization.h.
Referenced by Perform().
void InitializationSequence::InitializeFrom | ( | Sema & | S, |
const InitializedEntity & | Entity, | ||
const InitializationKind & | Kind, | ||
MultiExprArg | Args, | ||
bool | TopLevelOfInitList, | ||
bool | TreatUnavailableAsInvalid | ||
) |
Definition at line 6400 of file SemaInit.cpp.
References AddArrayInitStep(), AddAtomicConversionStep(), AddCAssignmentStep(), AddConversionSequenceStep(), AddListInitializationStep(), AddParenthesizedArrayInitStep(), AddPassByIndirectCopyRestoreStep(), AddZeroInitializationStep(), clang::Atomic, clang::OverloadCandidateSet::BestViableFunction(), canPerformArrayCopy(), clang::SemaObjC::CheckConversionToObjCLiteral(), clang::SemaObjC::CheckObjCBridgeRelatedConversions(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::Context, clang::IntegerLiteral::Create(), DependentSequence, E, clang::InitializedEntity::EK_Member, Failed(), clang::StandardConversionSequence::First, FK_AddressOfOverloadFailed, FK_AddressOfUnaddressableFunction, FK_ArrayNeedsInitList, FK_ArrayNeedsInitListOrStringLiteral, FK_ArrayNeedsInitListOrWideStringLiteral, FK_ArrayTypeMismatch, FK_ConstructorOverloadFailed, FK_ConversionFailed, FK_IncompatWideStringIntoWideChar, FK_NarrowStringIntoWideCharArray, FK_NonConstantArrayInit, FK_ParenthesizedListInitForReference, FK_ParenthesizedListInitForScalar, FK_PlaceholderType, FK_PlainStringIntoUTF8Char, FK_TooManyInitsForReference, FK_TooManyInitsForScalar, FK_UTF8StringIntoPlainChar, FK_VariableLengthArrayHasInitializer, FK_WideStringIntoCharArray, clang::Found, clang::ActionResult< PtrTy, Compress >::get(), clang::Type::getAs(), clang::ASTContext::getAsArrayType(), clang::Sema::getASTContext(), clang::RecordType::getDecl(), clang::InitializedEntity::getDecl(), clang::ArrayType::getElementType(), getFailedCandidateSet(), getFailureKind(), clang::ASTContext::getIntWidth(), clang::InitializedEntity::getKind(), clang::Sema::getLangOpts(), clang::ImplicitConversionSequence::getNullptrToBool(), clang::VectorType::getNumElements(), clang::StandardConversionSequence::getToType(), clang::InitializedEntity::getType(), clang::Expr::getValueKind(), clang::Expr::hasAnyTypeDependentArguments(), hasCompatibleArrayTypes(), clang::ASTContext::hasSameUnqualifiedType(), clang::ICK_Array_To_Pointer, clang::ICK_Lvalue_To_Rvalue, clang::ICK_Writeback_Conversion, clang::InitializationKind::IK_Copy, clang::InitializationKind::IK_Default, clang::InitializationKind::IK_Direct, clang::InitializationKind::IK_Value, clang::Initializer, clang::ASTContext::IntTy, clang::Type::isArrayParameterType(), clang::Type::isArrayType(), clang::ImplicitConversionSequence::isBad(), clang::Type::isBooleanType(), clang::Type::isCharType(), clang::Type::isDependentType(), clang::Sema::IsDerivedFrom(), isExprAnUnaddressableFunction(), clang::Type::isExtVectorType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), isLibstdcxxPointerReturnFalseHack(), clang::QualType::isNull(), clang::Type::isNullPtrType(), clang::InitializedEntity::isParameterKind(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::ImplicitConversionSequence::isStandard(), IsStringInit(), IsWideCharCompatible(), MaybeProduceObjCObject(), NormalSequence, clang::Sema::ObjC(), clang::Decl::OBJC_TQ_Out, clang::OR_Deleted, clang::ASTContext::OverloadTy, clang::Sema::ResolveAddressOfOverloadedFunction(), clang::StandardConversionSequence::Second, clang::StandardConversionSequence::setAllToTypes(), clang::StandardConversionSequence::setAsIdentityConversion(), SetFailed(), setSequenceKind(), clang::ImplicitConversionSequence::setStandard(), SIF_IncompatWideStringIntoWideChar, SIF_NarrowStringIntoWideChar, SIF_None, SIF_Other, SIF_PlainStringIntoUTF8Char, SIF_UTF8StringIntoPlainChar, SIF_WideStringIntoChar, clang::ImplicitConversionSequence::Standard, TryArrayCopy(), TryConstructorInitialization(), TryDefaultInitialization(), clang::Sema::TryImplicitConversion(), TryListInitialization(), tryObjCWritebackConversion(), TryOCLSamplerInitialization(), TryOCLZeroOpaqueTypeInitialization(), TryOrBuildParenListInitialization(), TryReferenceInitialization(), TryStringLiteralInitialization(), TryUserDefinedConversion(), and TryValueInitialization().
Referenced by InitializationSequence(), TryArrayCopy(), and TryListInitialization().
bool InitializationSequence::isAmbiguous | ( | ) | const |
Determine whether this initialization failed due to an ambiguity.
Definition at line 3825 of file SemaInit.cpp.
References Failed(), FK_AddressOfOverloadFailed, FK_AddressOfUnaddressableFunction, FK_ArrayNeedsInitList, FK_ArrayNeedsInitListOrStringLiteral, FK_ArrayNeedsInitListOrWideStringLiteral, FK_ArrayTypeMismatch, FK_ConstructorOverloadFailed, FK_ConversionFailed, FK_ConversionFromPropertyFailed, FK_DefaultInitOfConst, FK_DesignatedInitForNonAggregate, FK_ExplicitConstructor, FK_IncompatWideStringIntoWideChar, FK_Incomplete, FK_InitListBadDestinationType, FK_ListConstructorOverloadFailed, FK_ListInitializationFailed, FK_NarrowStringIntoWideCharArray, FK_NonConstantArrayInit, FK_NonConstLValueReferenceBindingToBitfield, FK_NonConstLValueReferenceBindingToMatrixElement, FK_NonConstLValueReferenceBindingToTemporary, FK_NonConstLValueReferenceBindingToUnrelated, FK_NonConstLValueReferenceBindingToVectorElement, FK_ParenthesizedListInitFailed, FK_ParenthesizedListInitForReference, FK_ParenthesizedListInitForScalar, FK_PlaceholderType, FK_PlainStringIntoUTF8Char, FK_ReferenceAddrspaceMismatchTemporary, FK_ReferenceBindingToInitList, FK_ReferenceInitDropsQualifiers, FK_ReferenceInitFailed, FK_ReferenceInitOverloadFailed, FK_RValueReferenceBindingToLValue, FK_TooManyInitsForReference, FK_TooManyInitsForScalar, FK_UserConversionOverloadFailed, FK_UTF8StringIntoPlainChar, FK_VariableLengthArrayHasInitializer, FK_WideStringIntoCharArray, getFailureKind(), and clang::OR_Ambiguous.
Referenced by TryClassUnification().
bool InitializationSequence::isConstructorInitialization | ( | ) | const |
Determine whether this initialization is direct call to a constructor.
Definition at line 3879 of file SemaInit.cpp.
References SK_ConstructorInitialization.
Referenced by TryStaticImplicitCast().
bool InitializationSequence::isDirectReferenceBinding | ( | ) | const |
Determine whether this initialization is a direct reference binding (C++ [dcl.init.ref]).
Definition at line 3814 of file SemaInit.cpp.
References SK_BindReference, and SK_BindReferenceToTemporary.
Referenced by TryClassUnification().
|
inlineexplicit |
Determine whether the initialization sequence is valid.
Definition at line 1235 of file Initialization.h.
References Failed().
ExprResult InitializationSequence::Perform | ( | Sema & | S, |
const InitializedEntity & | Entity, | ||
const InitializationKind & | Kind, | ||
MultiExprArg | Args, | ||
QualType * | ResultType = nullptr |
||
) |
Perform the actual initialization of the given entity based on the computed initialization sequence.
S | the semantic analysis object. |
Entity | the entity being initialized. |
Kind | the kind of initialization being performed. |
Args | the argument(s) provided for initialization, ownership of which is transferred into the routine. |
ResultType | if non-NULL, will be set to the type of the initialized object, which is the type of the declaration in most cases. However, when the initialized object is a variable of incomplete array type and the initializer is an initializer list, this type will be set to the completed array type. |
Definition at line 7584 of file SemaInit.cpp.
References clang::Sema::ActOnParenListExpr(), bool, clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildCXXMemberCallExpr(), clang::Type::castAs(), clang::Sema::checkAddressOfFunctionIsAvailable(), clang::Sema::CheckAddressOfMemberAccess(), CheckC23ConstexprInitConversion(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckDerivedToBaseConversion(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckExceptionSpecCompatibility(), CheckForNullPointerDereference(), checkIndirectCopyRestoreSource(), clang::Sema::checkInitializerLifetime(), clang::Sema::CheckMemberOperatorAccess(), CheckMoveOnConstruction(), clang::Sema::CheckPlaceholderExpr(), clang::Sema::CheckSingleAssignmentConstraints(), CheckStringInit(), clang::Sema::CheckTransparentUnionArgumentConstraints(), clang::Sema::Cleanup, clang::Sema::Compatible, clang::Complete, clang::Sema::CompleteConstructorCall(), clang::Sema::Context, CopyObject(), clang::ImplicitCastExpr::Create(), clang::Sema::CreateBuiltinArraySubscriptExpr(), clang::FixItHint::CreateInsertion(), clang::Sema::CreateMaterializeTemporaryExpr(), clang::CStyleCast, clang::Sema::CurFPFeatureOverrides(), D, DependentSequence, clang::Destructor, clang::SemaBase::Diag(), Diagnose(), clang::Sema::DiagnoseAssignmentResult(), DiagnoseNarrowingInInitList(), clang::Sema::DiagnoseUseOfDecl(), clang::Sema::DiscardMisalignedMemberAddress(), E, clang::InitializedEntity::EK_Base, clang::InitializedEntity::EK_Delegating, clang::InitializedEntity::EK_Member, clang::InitializedEntity::EK_Parameter_CF_Audited, clang::InitializedEntity::EK_ParenAggInitMember, clang::InitializedEntity::EK_Result, clang::InitializedEntity::EK_Variable, clang::Expr::EvaluateAsRValue(), clang::Evaluated, clang::ExprError(), Failed(), clang::Sema::FixOverloadedFunctionReference(), clang::InitializationSequence::Step::F::FoundDecl, clang::InitializationSequence::Step::F::Function, clang::InitializationSequence::Step::Function, clang::FunctionalCast, clang::ActionResult< PtrTy, Compress >::get(), clang::QualType::getAddressSpace(), clang::ActionResult< PtrTy, Compress >::getAs(), clang::Type::getAs(), clang::TypeLoc::getAs(), clang::ASTContext::getAsArrayType(), clang::ASTContext::getAsConstantArrayType(), clang::Type::getAsCXXRecordDecl(), clang::ASTContext::getAsIncompleteArrayType(), getAssignmentAction(), clang::SourceRange::getBegin(), clang::DeclaratorDecl::getBeginLoc(), clang::Decl::getBeginLoc(), clang::Stmt::getBeginLoc(), clang::ASTContext::getConstantArrayType(), clang::InitializedEntity::getDecl(), clang::CXXRecordDecl::getDefinition(), clang::ASTContext::getDependentSizedArrayType(), clang::SourceRange::getEnd(), clang::Expr::getExprLoc(), clang::InitListExpr::getInits(), clang::APValue::getInt(), clang::ASTContext::getIntWidth(), clang::InitializedEntity::getKind(), getKind(), clang::Sema::getLangOpts(), clang::InitListExpr::getLBraceLoc(), clang::ASTContext::getLValueReferenceType(), clang::QualType::getNonLValueExprType(), clang::QualType::getNonReferenceType(), clang::InitListExpr::getNumInits(), clang::Expr::getObjectKind(), clang::Sema::getOpenCLOptions(), clang::Type::getPointeeOrArrayElementType(), clang::InitListExpr::getRBraceLoc(), clang::FunctionDecl::getReturnType(), clang::ASTContext::getRValueReferenceType(), clang::ASTContext::getSizeType(), clang::Stmt::getSourceRange(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::ASTContext::getTrivialTypeSourceInfo(), clang::ValueDecl::getType(), clang::Expr::getType(), clang::InitializedEntity::getType(), clang::QualType::getTypePtr(), clang::InitializedEntity::getTypeSourceInfo(), clang::QualType::getUnqualifiedType(), clang::Expr::getValueKind(), clang::InitializationSequence::Step::F::HadMultipleCandidates, clang::QualType::hasAddressSpace(), clang::Decl::hasAttr(), clang::ASTContext::hasSameType(), clang::InitializationSequence::Step::ICS, clang::Expr::IgnoreParens(), clang::InitializationKind::IK_Copy, clang::InitializationKind::IK_Direct, clang::InitializationKind::IK_DirectList, clang::InitializationKind::IK_Value, clang::Sema::ImpCastExprToType(), clang::Implicit, clang::Init, clang::InitializedEntity::InitializeTemporary(), initializingConstexprVariable(), clang::EnterExpressionEvaluationContext::InitList, clang::Type::isArrayType(), clang::Type::isAtomicType(), clang::OpenCLOptions::isAvailableOption(), clang::Type::isDependentType(), clang::QualType::isDestructedType(), clang::Type::isEventT(), clang::Type::isExtVectorType(), clang::Type::isFunctionProtoType(), clang::Type::isIncompleteArrayType(), clang::Type::isIntegerType(), clang::ActionResult< PtrTy, Compress >::isInvalid(), clang::Expr::isLValue(), clang::Type::isLValueReferenceType(), clang::APValue::isNullPointer(), clang::Type::isOCLIntelSubgroupAVCType(), clang::InitializedEntity::isParameterKind(), clang::InitializedEntity::isParamOrTemplateParamKind(), clang::Expr::isPRValue(), clang::Type::isQueueT(), clang::Type::isRecordType(), clang::Type::isReferenceType(), clang::Type::isSamplerT(), clang::ReferenceType::isSpelledAsLValue(), clang::Sema::isStdInitializerList(), clang::InitializationSequence::Step::Kind, Loc, clang::Sema::LookupDestructor(), clang::Sema::MarkFunctionReferenced(), clang::Sema::MaybeBindToTemporary(), clang::Normal, clang::ASTContext::OCLSamplerTy, clang::opencl_global, clang::OtherCast, clang::SemaBase::PDiag(), PerformConstructorInitialization(), clang::Sema::PerformImplicitConversion(), clang::Sema::PerformQualificationConversion(), Range, clang::Sema::RequireNonAbstractType(), clang::Result, clang::SD_Automatic, clang::CleanupInfo::setExprNeedsCleanups(), clang::InitListExpr::setSyntacticForm(), clang::Expr::setType(), clang::Expr::setValueKind(), shouldBindAsTemporary(), shouldDestroyEntity(), SK_ArrayInit, SK_ArrayLoopIndex, SK_ArrayLoopInit, SK_AtomicConversion, SK_BindReference, SK_BindReferenceToTemporary, SK_CAssignment, SK_CastDerivedToBaseLValue, SK_CastDerivedToBasePRValue, SK_CastDerivedToBaseXValue, SK_ConstructorInitialization, SK_ConstructorInitializationFromList, SK_ConversionSequence, SK_ConversionSequenceNoNarrowing, SK_ExtraneousCopyToTemporary, SK_FinalCopy, SK_FunctionReferenceConversion, SK_GNUArrayInit, SK_ListInitialization, SK_ObjCObjectConversion, SK_OCLSamplerInit, SK_OCLZeroOpaqueType, SK_ParenthesizedArrayInit, SK_ParenthesizedListInit, SK_PassByIndirectCopyRestore, SK_PassByIndirectRestore, SK_ProduceObjCObject, SK_QualificationConversionLValue, SK_QualificationConversionPRValue, SK_QualificationConversionXValue, SK_ResolveAddressOfOverloadedFunction, SK_RewrapInitList, SK_StdInitializerList, SK_StdInitializerListConstructorCall, SK_StringInit, SK_UnwrapInitList, SK_UserConversion, SK_ZeroInitialization, step_begin(), step_end(), clang::T, TryOrBuildParenListInitialization(), clang::InitializationSequence::Step::Type, updateGNUCompoundLiteralRValue(), clang::Expr::EvalResult::Val, clang::VK_LValue, clang::VK_PRValue, clang::VK_XValue, clang::QualType::withConst(), and clang::InitializationSequence::Step::WrappingSyntacticList.
Referenced by clang::SemaOpenMP::ActOnOpenMPFirstprivateClause(), clang::Sema::AddInitializerToDecl(), clang::Sema::BuildBaseInitializer(), clang::Sema::BuildCaptureInit(), clang::Sema::BuildCompoundLiteralExpr(), clang::Sema::buildCoroutinePromise(), clang::Sema::BuildCXXNew(), clang::Sema::BuildCXXTypeConstructExpr(), clang::Sema::BuildDelegatingInitializer(), clang::Sema::BuildExceptionDeclaration(), BuildImplicitBaseInitializer(), clang::Sema::buildLambdaInitCaptureInitialization(), clang::Sema::BuildMemberInitializer(), clang::Sema::CheckTemplateArgument(), ConvertForConditional(), clang::Sema::ConvertParamDefaultArgument(), clang::Sema::CreateBuiltinBinOp(), clang::Sema::FindCompositePointerType(), clang::Sema::tryConvertExprToType(), TryOrBuildParenListInitialization(), and TryStaticImplicitCast().
void InitializationSequence::RewrapReferenceInitList | ( | QualType | T, |
InitListExpr * | Syntactic | ||
) |
Add steps to unwrap a initializer list for a reference around a single element and rewrap it at the end.
Definition at line 4119 of file SemaInit.cpp.
References clang::InitListExpr::getInit(), clang::InitListExpr::getNumInits(), clang::Expr::getType(), SK_RewrapInitList, SK_UnwrapInitList, and clang::T.
Referenced by TryConstructorInitialization(), TryListInitialization(), and TryReferenceListInitialization().
|
inline |
Note that this initialization sequence failed.
Definition at line 1397 of file Initialization.h.
References FailedSequence, FK_Incomplete, and clang::QualType::isNull().
Referenced by InitializeFrom(), ResolveOverloadedFunctionForReferenceBinding(), setIncompleteTypeFailure(), TryConstructorInitialization(), TryDefaultInitialization(), TryListInitialization(), TryOrBuildParenListInitialization(), TryReferenceInitializationCore(), TryReferenceListInitialization(), and TryValueInitialization().
|
inline |
Note that this initialization sequence failed due to an incomplete type.
Definition at line 1422 of file Initialization.h.
References FK_Incomplete, and SetFailed().
Referenced by TryConstructorInitialization(), TryInitializerListConstruction(), and TryListInitialization().
void InitializationSequence::SetOverloadFailure | ( | FailureKind | Failure, |
OverloadingResult | Result | ||
) |
Note that this initialization sequence failed due to failed overload resolution.
Definition at line 4134 of file SemaInit.cpp.
References FailedSequence, clang::Result, and setSequenceKind().
Referenced by TryConstructorInitialization(), TryReferenceInitializationCore(), and TryUserDefinedConversion().
|
inline |
Set the kind of sequence computed.
Definition at line 1232 of file Initialization.h.
Referenced by InitializeFrom(), SetOverloadFailure(), and TryOrBuildParenListInitialization().
|
inline |
Call for initializations are invalid but that would be valid zero initialzations if Fixit was applied.
Definition at line 1150 of file Initialization.h.
Referenced by maybeRecoverWithZeroInitialization().
|
inline |
Definition at line 1242 of file Initialization.h.
Referenced by clang::Sema::AddInitializerToDecl(), dump(), Perform(), steps(), and TryReferenceListInitialization().
|
inline |
Definition at line 1243 of file Initialization.h.
Referenced by dump(), Perform(), steps(), and TryReferenceListInitialization().
|
inline |
Definition at line 1247 of file Initialization.h.
References step_begin(), and step_end().
Referenced by clang::Sema::AddInitializerToDecl().