aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/RegionStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/RegionStore.cpp')
-rw-r--r--lib/Analysis/RegionStore.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Analysis/RegionStore.cpp b/lib/Analysis/RegionStore.cpp
index cdc8b2723d..73b25955c1 100644
--- a/lib/Analysis/RegionStore.cpp
+++ b/lib/Analysis/RegionStore.cpp
@@ -273,6 +273,8 @@ SVal RegionStoreManager::getSizeInElements(const GRState* St,
if (const StringRegion* SR = dyn_cast<StringRegion>(R)) {
const StringLiteral* Str = SR->getStringLiteral();
+ // We intentionally made the size value signed because it participates in
+ // operations with signed indices.
return NonLoc::MakeVal(getBasicVals(), Str->getByteLength(), false);
}