On Feb 6, 2013, at 3:21 PM, Ted Kremenek <[email protected]> wrote:

> On Feb 6, 2013, at 3:15 PM, Anna Zaks <[email protected]> wrote:
> 
>> 
>> Currently, we reset the static variables with initializers on every visit to 
>> the function along a path. The solution might be a bit hacky as we check if 
>> the region has been stored something other than a LazyCompoundVal to find 
>> out if the static variable has been assigned to previously.

OK. Thanks for the suggestion.
Anna.
> 
> Hi Anna,
> 
> Why not just record the initialization in a side-table in the GDM?  That 
> seems a lot cleaner.  This patch seems to rely on all the other pieces 
> working correctly.  It also doesn't seem correct.  A static variable for an 
> Objective-C pointer is guaranteed to be a valid value (it is 
> zero-initialized), even if we haven't visited the initializer yet.  For 
> example:
> 
>   static id x;  // this is always zero-initialized
> 
> Ted

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to