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

Ted Kremenek kremenek at apple.com
Tue May 8 17:04:17 PDT 2012


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/20120508/8a8a229e/attachment.html>


More information about the cfe-commits mailing list