forked from OSchip/llvm-project
Add final/explicit getters and setters to CXXRecordDecl.
llvm-svn: 124037
This commit is contained in:
parent
4b63d0e0a7
commit
67f9e61127
|
@ -356,6 +356,12 @@ class CXXRecordDecl : public RecordDecl {
|
|||
/// \brief Whether we have already declared a destructor within the class.
|
||||
bool DeclaredDestructor : 1;
|
||||
|
||||
/// \brief Whether this class is marked 'final'.
|
||||
bool IsMarkedFinal : 1;
|
||||
|
||||
/// \brief Whether this class is marked 'explicit'.
|
||||
bool IsMarkedExplicit : 1;
|
||||
|
||||
/// NumBases - The number of base class specifiers in Bases.
|
||||
unsigned NumBases;
|
||||
|
||||
|
@ -659,6 +665,18 @@ public:
|
|||
/// This value is used for lazy creation of destructors.
|
||||
bool hasDeclaredDestructor() const { return data().DeclaredDestructor; }
|
||||
|
||||
/// \brief Whether this class is marked 'final'.
|
||||
bool isMarkedFinal() const { return data().IsMarkedFinal; }
|
||||
|
||||
/// \brief Mark this class as 'final'.
|
||||
void setIsMarkedFinal(bool IMF) { data().IsMarkedFinal = IMF; }
|
||||
|
||||
/// \brief Whether this class is marked 'explicit'.
|
||||
bool isMarkedExplicit() const { return data().IsMarkedExplicit; }
|
||||
|
||||
/// \brief Mark this class as 'explicit'.
|
||||
void setIsMarkedExplicit(bool IME) { data().IsMarkedExplicit = IME; }
|
||||
|
||||
/// getConversions - Retrieve the overload set containing all of the
|
||||
/// conversion functions in this class.
|
||||
UnresolvedSetImpl *getConversionFunctions() {
|
||||
|
|
|
@ -36,6 +36,7 @@ CXXRecordDecl::DefinitionData::DefinitionData(CXXRecordDecl *D)
|
|||
HasTrivialDestructor(true), ComputedVisibleConversions(false),
|
||||
DeclaredDefaultConstructor(false), DeclaredCopyConstructor(false),
|
||||
DeclaredCopyAssignment(false), DeclaredDestructor(false),
|
||||
IsMarkedFinal(false), IsMarkedExplicit(false),
|
||||
NumBases(0), NumVBases(0), Bases(), VBases(),
|
||||
Definition(D), FirstFriend(0) {
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue