>>> ScopedDecl would have a DeclContext member and >>> isDefinedOutsideFunctionOrMethod would check if it's a FunctionDecl. >> >> Yes, this is exactly what I was thinking (But ContextDecl instead >> of DeclContext :). >> >> With this change, we could then have a TranslationUnitDecl for the >> top-level. It, ObjCMethod, and NamespaceDecl would also inherit >> from DeclContext. What do you think? >> >> -Chris > This sounds perfect. I'd like to give it a try tomorrow, if I may.
Wow, thanks! > Should the ContextDecl member of ScopedDecl be a read-only property, > its value passed to the constructors of decls ? Or should there be a > setContextDecl method ? > (The latter would be a bit more straightforward, if read-only is not > a requirement). I don't have a strong opinion. I think it does make sense to pass it into the ctor, but having a way to change it later could be useful. I'll leave it up to you. Thanks Algiris. Also, I apologize for not getting to your namespace patch sooner. -Chris _______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
