[cfe-dev] Cleaning up the representation of Decls in the AST

Daniel Dunbar 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
how we
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

 - Daniel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080825/e5709a04/attachment.html>

More information about the cfe-dev mailing list