[cfe-commits] r123885 - in /cfe/trunk: include/clang/AST/Decl.h lib/Serialization/ASTReaderDecl.cpp lib/Serialization/ASTWriterDecl.cpp
Anders Carlsson
andersca at mac.com
Wed Jan 19 21:36:44 PST 2011
Author: andersca
Date: Wed Jan 19 23:36:44 2011
New Revision: 123885
URL: http://llvm.org/viewvc/llvm-project?rev=123885&view=rev
Log:
Add IsMarkedOverride and IsMarkedFinal flags to FunctionDecl (to be used by CXXRecordDecl).
Modified:
cfe/trunk/include/clang/AST/Decl.h
cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
Modified: cfe/trunk/include/clang/AST/Decl.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Decl.h?rev=123885&r1=123884&r2=123885&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Decl.h (original)
+++ cfe/trunk/include/clang/AST/Decl.h Wed Jan 19 23:36:44 2011
@@ -1195,6 +1195,8 @@
bool IsDeleted : 1;
bool IsTrivial : 1; // sunk from CXXMethodDecl
bool HasImplicitReturnZero : 1;
+ bool IsMarkedOverride : 1; // sunk from CXXMethodDecl
+ bool IsMarkedFinal : 1; // sunk from CXXMethodDecl
/// \brief End part of this FunctionDecl's source range.
///
@@ -1274,8 +1276,8 @@
IsInline(isInlineSpecified), IsInlineSpecified(isInlineSpecified),
IsVirtualAsWritten(false), IsPure(false), HasInheritedPrototype(false),
HasWrittenPrototype(true), IsDeleted(false), IsTrivial(false),
- HasImplicitReturnZero(false),
- EndRangeLoc(NameInfo.getEndLoc()),
+ HasImplicitReturnZero(false), IsMarkedOverride(false),
+ IsMarkedFinal(false), EndRangeLoc(NameInfo.getEndLoc()),
TemplateOrSpecialization(),
DNLoc(NameInfo.getInfo()) {}
@@ -1388,6 +1390,16 @@
bool hasImplicitReturnZero() const { return HasImplicitReturnZero; }
void setHasImplicitReturnZero(bool IRZ) { HasImplicitReturnZero = IRZ; }
+ /// \brief Whether this member function is marked with the 'override' keyword,
+ /// C++0x [class.mem]p8.
+ bool isMarkedOverride() const { return IsMarkedOverride; }
+ void setIsMarkedOverride(bool IMO) { IsMarkedOverride = IMO; }
+
+ /// \brief Whether this member function is marked with the 'final' keyword,
+ /// C++0x [class.mem]p8.
+ bool isMarkedFinal() const { return IsMarkedFinal; }
+ void setIsMarkedFinal(bool IMF) { IsMarkedFinal = IMF; }
+
/// \brief Whether this function has a prototype, either because one
/// was explicitly written or because it was "inherited" by merging
/// a declaration without a prototype with a declaration that has a
Modified: cfe/trunk/lib/Serialization/ASTReaderDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReaderDecl.cpp?rev=123885&r1=123884&r2=123885&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReaderDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReaderDecl.cpp Wed Jan 19 23:36:44 2011
@@ -395,6 +395,9 @@
FD->IsDeleted = Record[Idx++];
FD->IsTrivial = Record[Idx++];
FD->HasImplicitReturnZero = Record[Idx++];
+ FD->IsMarkedOverride = Record[Idx++];
+ FD->IsMarkedFinal = Record[Idx++];
+
FD->EndRangeLoc = ReadSourceLocation(Record, Idx);
// Read in the parameters.
Modified: cfe/trunk/lib/Serialization/ASTWriterDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriterDecl.cpp?rev=123885&r1=123884&r2=123885&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriterDecl.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriterDecl.cpp Wed Jan 19 23:36:44 2011
@@ -312,6 +312,8 @@
Record.push_back(D->isDeleted());
Record.push_back(D->isTrivial());
Record.push_back(D->hasImplicitReturnZero());
+ Record.push_back(D->isMarkedOverride());
+ Record.push_back(D->isMarkedFinal());
Writer.AddSourceLocation(D->getLocEnd(), Record);
Record.push_back(D->param_size());
More information about the cfe-commits
mailing list