[cfe-dev] [PATCH]: Preparing AST for C++ declarations
Argiris Kirtzidis
akyrtzi at gmail.com
Tue Jun 3 18:06:28 PDT 2008
Hi,
The attached patch contains these changes:
-New Decl subclasses:
CXXField (derived from Field) - instance fields
CXXRecord (derived from Record) - Records for C++
CXXMethod (derived from Function) - static and instance methods
CXXClassVar (derived from Var) - static data members
-Because there are two "types" of tags (Struct/CXXStruct etc.), to avoid
constantly checking for both (i.e. when you need to know whether the
Record is a 'struct' or 'union'),
I've added a TagKind enum in TagDecl and a TagDecl::getTagKind method.
Plus, RecordDecl/CXXRecordDecl::Create methods receive a
TagDecl::TagKind enum instead of the general Decl::Kind enum.
-DeclContext gets a "ScopedDecl *DeclChain" member, which is used to
chain decls that belong to the same DeclContext.
-Argiris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ast-cxxdecl-2.patch
Type: text/x-diff
Size: 68929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080603/785cff16/attachment.patch>
More information about the cfe-dev
mailing list