On Aug 7, 2008, at 4:56 PM, Daniel Dunbar wrote:

> I don't particularly care for the conditional deletion an argument.  
> Just from
> a semantic view it complicates ownership and makes the code less  
> obviously
> correct on a quick visual inspection.
>
> I think we should just pull the deletion out of ParseAST(). Its  
> almost simpler
> for the caller to use an owning pointer anyway.

After also discussing this with Daniel in person, I definitely think  
this is the right approach.  Clients should be free to interrogate the  
ASTConsumer after ParseAST has completed, and it is easy to make it  
the client's responsibility to delete the ASTConsumer.  It will also  
force people not to put logic in the destructor of an ASTConsumer  
other than necessary cleanup.

The following patch implements this change:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080804/006869.html
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to