]> granicus.if.org Git - clang/commitdiff
Add a comment about the signedness.
authorZhongxing Xu <xuzhongxing@gmail.com>
Mon, 24 Nov 2008 02:30:48 +0000 (02:30 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Mon, 24 Nov 2008 02:30:48 +0000 (02:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59932 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index cdc8b2723d15cd70cb80a6bce6c58dc84925e964..73b25955c14d34ef0859713d5bf05d5656cd7e0b 100644 (file)
@@ -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);
   }