From 8361d4c51bd191f29dca50f5320e9c36955887c4 Mon Sep 17 00:00:00 2001 From: Zhongxing Xu Date: Mon, 24 Nov 2008 02:30:48 +0000 Subject: Add a comment about the signedness. llvm-svn: 59932 --- clang/lib/Analysis/RegionStore.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/Analysis') diff --git a/clang/lib/Analysis/RegionStore.cpp b/clang/lib/Analysis/RegionStore.cpp index cdc8b2723d1..73b25955c14 100644 --- a/clang/lib/Analysis/RegionStore.cpp +++ b/clang/lib/Analysis/RegionStore.cpp @@ -273,6 +273,8 @@ SVal RegionStoreManager::getSizeInElements(const GRState* St, if (const StringRegion* SR = dyn_cast(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); } -- cgit v1.2.3