[cfe-dev] Cleaning up the representation of Decls in the AST
daniel at zuster.org
Mon Aug 25 16:45:07 PDT 2008
> Presumably this means that "typedef struct x foo, bar" would be a
> > DeclGroup with no "TypeDecl" but with two typedef decls?
> The "TypeDecl" would be 'struct x'.
> The DeclGroup would contain two TypedefDecls, one for the typedef of
> foo and the other for the typedef of bar.
I think this requires some elaboration: The representation here depends on
are handling multiple RecordDecls. If the 'struct x' in the typedef
generates a new
RecordDecl for a forward reference then it would own this Decl, and the
would point to it. If the 'struct x' in the typedef does not generate a new
then it would be NULL.
In either situation the contained list of Decls would include two
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev