[cfe-dev] Reference-counted statements

Fariborz Jahanian fjahanian at apple.com
Fri Aug 7 10:15:51 PDT 2009


Ref counting is fine. One issue I see is when traversing the tree (for  
whatever reason)
with shared nodes. Need a special flag in the node (or some other  
mechanism) to not revisit the shared sub-tree.

- Fariborz

On Aug 7, 2009, at 9:26 AM, Douglas Gregor wrote:

> Daniel, Ted, John and I had a design discussion yesterday about the  
> ownership model for expressions and statements in Clang. The  
> catalyst for this discussion is the generic tree transformation that  
> went into Clang earlier this week, and on the problem of  
> transforming expression trees. In particular, given the expression
>
> 	x + y
>
> let's say that the tree transformer transforms x into x' but leaves  
> y alone. It will then attempt to construct a new addition operation
>
> 	x' +' y
>



More information about the cfe-dev mailing list