[cfe-commits] r110020 - in /cfe/trunk: include/clang/Checker/PathSensitive/MemRegion.h lib/Checker/FlatStore.cpp lib/Checker/MemRegion.cpp lib/Checker/RegionStore.cpp lib/Checker/SimpleSValuator.cpp lib/Checker/Store.cpp test/Analysis/flat-store.

Zhongxing Xu xuzhongxing at gmail.com
Mon Aug 2 18:25:08 PDT 2010


On Tue, Aug 3, 2010 at 12:12 AM, Ted Kremenek <kremenek at apple.com> wrote:
> On Aug 1, 2010, at 9:56 PM, Zhongxing Xu <xuzhongxing at gmail.com> wrote:
>
>> +/// Represent a region's offset within the top level base region.
>> +class RegionOffset {
>> +  /// The base region.
>> +  const MemRegion *R;
>> +
>> +  /// The bit offset within the base region. It shouldn't be negative.
>> +  uint64_t Offset;
>
> Why is the offset guaranteed to be non-negative?  Can't we construct ElementRegions with a negative index?
>

Because the offset is within the toplevel object region and used for
representing region bindings, binding to a negative index is illegal.




More information about the cfe-commits mailing list