[cfe-dev] [PATCH]: Preparing AST for C++ declarations
akyrtzi at gmail.com
Tue Jun 3 18:06:28 PDT 2008
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 68929 bytes
Desc: not available
More information about the cfe-dev