From: Zhongxing Xu Date: Mon, 24 Nov 2008 02:30:48 +0000 (+0000) Subject: Add a comment about the signedness. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d0fd3b747c46211c481021ffb9cabd5635f918ed;p=clang Add a comment about the signedness. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59932 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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(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); }