aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer')
-rw-r--r--lib/StaticAnalyzer/MemRegion.cpp4
-rw-r--r--lib/StaticAnalyzer/RegionStore.cpp2
-rw-r--r--lib/StaticAnalyzer/SimpleSValBuilder.cpp4
-rw-r--r--lib/StaticAnalyzer/Store.cpp2
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/MemRegion.cpp b/lib/StaticAnalyzer/MemRegion.cpp
index d3d72b51a7..eca7619d3f 100644
--- a/lib/StaticAnalyzer/MemRegion.cpp
+++ b/lib/StaticAnalyzer/MemRegion.cpp
@@ -469,7 +469,7 @@ void RegionRawOffset::dump() const {
}
void RegionRawOffset::dumpToStream(llvm::raw_ostream& os) const {
- os << "raw_offset{" << getRegion() << ',' << getByteOffset() << '}';
+ os << "raw_offset{" << getRegion() << ',' << getOffset().getQuantity() << '}';
}
void StaticGlobalSpaceRegion::dumpToStream(llvm::raw_ostream &os) const {
@@ -855,7 +855,7 @@ RegionRawOffset ElementRegion::getAsArrayOffset() const {
}
assert(superR && "super region cannot be NULL");
- return RegionRawOffset(superR, offset.getQuantity());
+ return RegionRawOffset(superR, offset);
}
RegionOffset MemRegion::getAsOffset() const {
diff --git a/lib/StaticAnalyzer/RegionStore.cpp b/lib/StaticAnalyzer/RegionStore.cpp
index 3c048064f6..986278e628 100644
--- a/lib/StaticAnalyzer/RegionStore.cpp
+++ b/lib/StaticAnalyzer/RegionStore.cpp
@@ -86,7 +86,7 @@ BindingKey BindingKey::Make(const MemRegion *R, Kind k) {
// FIXME: There are some ElementRegions for which we cannot compute
// raw offsets yet, including regions with symbolic offsets. These will be
// ignored by the store.
- return BindingKey(O.getRegion(), O.getByteOffset(), k);
+ return BindingKey(O.getRegion(), O.getOffset().getQuantity(), k);
}
return BindingKey(R, 0, k);
diff --git a/lib/StaticAnalyzer/SimpleSValBuilder.cpp b/lib/StaticAnalyzer/SimpleSValBuilder.cpp
index a6432121f5..6c65da4635 100644
--- a/lib/StaticAnalyzer/SimpleSValBuilder.cpp
+++ b/lib/StaticAnalyzer/SimpleSValBuilder.cpp
@@ -724,8 +724,8 @@ SVal SimpleSValBuilder::evalBinOpLL(const GRState *state,
if (LeftOffset.getRegion() != NULL &&
LeftOffset.getRegion() == RightOffset.getRegion()) {
- int64_t left = LeftOffset.getByteOffset();
- int64_t right = RightOffset.getByteOffset();
+ CharUnits left = LeftOffset.getOffset();
+ CharUnits right = RightOffset.getOffset();
switch (op) {
default:
diff --git a/lib/StaticAnalyzer/Store.cpp b/lib/StaticAnalyzer/Store.cpp
index d162eed247..fa671a3bb0 100644
--- a/lib/StaticAnalyzer/Store.cpp
+++ b/lib/StaticAnalyzer/Store.cpp
@@ -147,7 +147,7 @@ const MemRegion *StoreManager::CastRegion(const MemRegion *R, QualType CastToTy)
if (!baseR)
return NULL;
- CharUnits off = CharUnits::fromQuantity(rawOff.getByteOffset());
+ CharUnits off = rawOff.getOffset();
if (off.isZero()) {
// Edge case: we are at 0 bytes off the beginning of baseR. We