[cfe-dev] CFGElement changes and initializers addition (with patch)
Ted Kremenek
kremenek at apple.com
Fri Aug 27 17:30:32 PDT 2010
On Aug 25, 2010, at 6:56 PM, Zhongxing Xu wrote:
> We can make the control-dependency explicit in the CFG only when it is needed.
>
> Currently, int x =f(); and int x = x&& x; are both handled well with
> explicit control flow in the CFG.
>
> For int x = 3; or A x=A(); we don't need to make '3' and 'A()'
> block-level exprs.
>
> Do you mean we should uniformly make all initializers block-level exprs?
By "initializers", I was referring to the member initializers in the constructor. E.g.:
class A {
A() : foo(...), bar(...) {}
};
My thought was that all initializers should be CFGElements (i.e., block-level expressions), since there is clearly a control-dependency between them. This would only come into play when constructing a CFG for a constructor.
More information about the cfe-dev
mailing list