[cfe-dev] Function body type

Ted Kremenek kremenek at apple.com
Mon Apr 27 10:11:30 PDT 2009


On Apr 26, 2009, at 8:46 AM, Douglas Gregor wrote:

>> be either a CompoundStmt or a CXXTryStmt (by having getBody() return
>> either a Stmt* or a PointerVariant). However, this change is quite
>> disrupting to many, many components.
>
> I think using Stmt* is perfectly reasonable

I strongly prefer a PointVariant unless there is a compelling reason  
not to use one.  It directly documents in the type signature of the  
method what the possible returned Stmts can be.  Not everyone using  
the ASTs is going to be a language expert.



More information about the cfe-dev mailing list