[cfe-commits] r156446 - in /cfe/trunk: lib/StaticAnalyzer/Core/RegionStore.cpp test/Analysis/region-store.c

Anna Zaks ganna at apple.com
Wed May 9 10:48:09 PDT 2012


In r 156482.
Thanks.
On May 8, 2012, at 5:04 PM, Ted Kremenek wrote:

> On May 8, 2012, at 4:40 PM, Anna Zaks <ganna at apple.com> wrote:
> 
>> SVal RegionStoreManager::getBindingForElement(Store store,
>> -                                         const ElementRegion* R) {
>> +                                              const ElementRegion* R) {
>> +  // We do not currently model bindings of the CompoundLiteralregion.
>> +  const ElementRegion *Tmp = R;
>> +  while (Tmp) {
>> +    const MemRegion *Sup = Tmp->getSuperRegion();
>> +    if (isa<CompoundLiteralRegion>(Sup))
>> +      return UnknownVal();
>> +    Tmp = dyn_cast<ElementRegion>(Sup);
>> +  }
>> +
> 
> Hi Anna,
> 
> You can just call getBaseRegion() instead of manually going through the region hierarchy.
> 
> Cheers,
> Ted

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120509/c5bb8ea3/attachment.html>


More information about the cfe-commits mailing list