[cfe-commits] r124037 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp
Anders Carlsson
andersca at mac.com
Sat Jan 22 09:22:48 PST 2011
Author: andersca
Date: Sat Jan 22 11:22:48 2011
New Revision: 124037
URL: http://llvm.org/viewvc/llvm-project?rev=124037&view=rev
Log:
Add final/explicit getters and setters to CXXRecordDecl.
Modified:
cfe/trunk/include/clang/AST/DeclCXX.h
cfe/trunk/lib/AST/DeclCXX.cpp
Modified: cfe/trunk/include/clang/AST/DeclCXX.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=124037&r1=124036&r2=124037&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/DeclCXX.h (original)
+++ cfe/trunk/include/clang/AST/DeclCXX.h Sat Jan 22 11:22:48 2011
@@ -356,6 +356,12 @@
/// \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;
@@ -658,7 +664,19 @@
///
/// 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() {
Modified: cfe/trunk/lib/AST/DeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclCXX.cpp?rev=124037&r1=124036&r2=124037&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclCXX.cpp (original)
+++ cfe/trunk/lib/AST/DeclCXX.cpp Sat Jan 22 11:22:48 2011
@@ -36,6 +36,7 @@
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) {
}
More information about the cfe-commits
mailing list