[cfe-dev] Patch for TranslationUnitDecl

Argiris Kirtzidis akyrtzi at gmail.com
Mon Apr 14 08:49:53 PDT 2008


Hi,

A summary of the attached patch is this:

-Added TranslationUnitDecl class to serve as top declaration context
-ASTContext gets a TUDecl member and a getTranslationUnitDecl() function
-All ScopedDecls get the TUDecl as DeclContext when declared at global scope

Note that I didn't touch the objc decls, so TUDecl doesn't apply for 
them (getParent() of ObjCMethod will return null).
Someone more familiar with objc should probably sort out the DeclContext 
chains for them.


-Argiris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tudecl.patch
Type: text/x-diff
Size: 20778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080414/5c3f76dd/attachment.patch>


More information about the cfe-dev mailing list