Chris Lattner wrote:
> The second is more interesting for your namespace patch. I think we
> really do need an AST-side concept of "scope", which is similar to the
> parser one, but is also a bit different. This would allow the
> implementation of ScopedDecl::isDefinedOutsideFunctionOrMethod to
> correctly handle typedefs defined inside functions etc.
Just a suggestion, how about a 'DeclContext' AST class that FunctionDecl
would inherit from (and NamespaceDecl, RecordDecl):
class FunctionDecl : public ValueDecl, public DeclContext {
....
ScopedDecl would have a DeclContext member and
isDefinedOutsideFunctionOrMethod would check if it's a FunctionDecl.
_______________________________________________
cfe-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev