[cfe-commits] r71548 - in /cfe/trunk: include/clang/Analysis/PathSensitive/MemRegion.h include/clang/Analysis/PathSensitive/SVals.h include/clang/Analysis/PathSensitive/Store.h lib/Analysis/CFRefCount.cpp lib/Analysis/RegionStore.cpp lib/Analysis/SVals.cpp test/Analysis/array-struct.c

Ted Kremenek kremenek at apple.com
Tue May 12 10:11:36 PDT 2009


On May 12, 2009, at 9:56 AM, Ted Kremenek wrote:

> On May 12, 2009, at 3:10 AM, Zhongxing Xu wrote:
>
>> +++ cfe/trunk/include/clang/Analysis/PathSensitive/Store.h Tue May  
>> 12 05:10:00 2009
>> @@ -161,6 +161,11 @@
>>    return St;
>>  }
>>
>> +  virtual const GRState* setDefaultValue(const GRState* St,
>> +                                         const MemRegion* R, SVal  
>> V) {
>> +    return St;
>> +  }
>> +
>
> Hi Zhongxing,
>
> I noticed the addition of this method to StoreManager, but I don't  
> quite know what it does.  Could you add some comments?  I see it  
> used later, but I cannot quite evaluate the approach without a  
> little more context.  Thanks!
>
> Ted

I think I understand.  'setDefaultValue' installs a default value for  
a MemRegion (e.g., representing an array) that will be used when no  
value is available for a specific element of that region.  Is this the  
right approach?  This basically assumes that all elements within that  
region have the same value.



More information about the cfe-commits mailing list