[cfe-dev] top level decls

Ted Kremenek kremenek at apple.com
Fri Nov 30 09:45:52 PST 2007


On Nov 30, 2007, at 9:39 AM, Chris Lattner wrote:

> I'm starting to think that a pull interface for decls doesn't really
> work well.  Maybe we should change Sema to take an ASTConsumer object
> and have it push decls into the ASTConsumer, instead of fully
> returning out of the parser to return a decl.  The big problem with
> this is that it makes it harder to stop the parser at an arbitrary
> point.  We'd have to add explicit code to handle this.

This is one idea that Steve and I batted around yesterday, and it has  
some nice properties.  Decls can be handed back to the consumer at the  
moment they are processed, which obviates some of the bookkeeping  
issues in the Parser.



More information about the cfe-dev mailing list