[cfe-dev] CFGElement changes and initializers addition (with patch)
Zhongxing Xu
xuzhongxing at gmail.com
Sat Aug 28 22:18:48 PDT 2010
On Sat, Aug 28, 2010 at 8:30 AM, Ted Kremenek <kremenek at apple.com> wrote:
>
> 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.
Agree.
More information about the cfe-dev
mailing list