25 for (
const auto *Field : BaseClassDecl->
fields())
30 for (
const auto &I : BaseClassDecl->
bases()) {
36 MostDerivedClassDecl))
40 if (BaseClassDecl == MostDerivedClassDecl) {
42 for (
const auto &I : BaseClassDecl->
vbases()) {
43 const auto *
VirtualBase = I.getType()->castAsCXXRecordDecl();
54 QualType FieldBaseElementType = Context.getBaseElementType(Field->getType());
61 if (FieldClassDecl->isUnion() && FieldClassDecl->isAnonymousStructOrUnion())
80 if (!Dtor->hasTrivialBody())
84 for (
const auto *Field : ClassDecl->
fields())
92 if (!LangOpts.Exceptions)
96 if (LangOpts.CXXExceptions)
100 if (LangOpts.ObjCExceptions) {
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Represents a C++ base or member initializer.
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
Represents a C++ destructor within a class.
Represents a C++ struct/union/class.
bool isEffectivelyFinal() const
Determine whether it's impossible for a class to be derived from this class.
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
base_class_range vbases()
bool isDynamicClass() const
CXXDestructorDecl * getDestructor() const
Returns the destructor decl for this class.
Represents a member of a struct/union/class.
bool hasTrivialBody() const
Returns whether the function has a trivial body that does not require any specific codegen.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
clang::ObjCRuntime ObjCRuntime
bool hasUnwindExceptions() const
Does this runtime use zero-cost exceptions?
A (possibly-)qualified type.
field_range fields() const
Exposes information about the current target.
virtual StringRef getABI() const
Get the ABI currently in use.
The base class of the type hierarchy.
CXXRecordDecl * getAsCXXRecordDecl() const
Retrieves the CXXRecordDecl that this type refers to, either because the type is a RecordType or beca...
CXXRecordDecl * castAsCXXRecordDecl() const
Defines the clang::TargetInfo interface.
static bool hasTrivialDestructorBody(ASTContext &Context, const CXXRecordDecl *BaseClassDecl, const CXXRecordDecl *MostDerivedClassDecl)
bool isAAPCS(const TargetInfo &TargetInfo)
Helper method to check if the underlying ABI is AAPCS.
bool isInitializerOfDynamicClass(const CXXCtorInitializer *BaseInit)
bool canSkipVTablePointerInitialization(ASTContext &Ctx, const CXXDestructorDecl *Dtor)
Check whether we need to initialize any vtable pointers before calling this destructor.
bool fieldHasTrivialDestructorBody(ASTContext &Context, const FieldDecl *Field)
Check whether destructing Field has no observable behaviors, and thus can be skipped when creating a ...
bool hasUnwindExceptions(const LangOptions &LangOpts)
Determines whether the language options require us to model unwind exceptions.