[cfe-commits] r60938 - /cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h

Chris Lattner sabre at nondot.org
Thu Dec 11 23:16:10 PST 2008


Author: lattner
Date: Fri Dec 12 01:16:09 2008
New Revision: 60938

URL: http://llvm.org/viewvc/llvm-project?rev=60938&view=rev
Log:
silence warning in release-asserts mode about unused variable, also
move comment into assert message.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h?rev=60938&r1=60937&r2=60938&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/MemRegion.h Fri Dec 12 01:16:09 2008
@@ -420,9 +420,9 @@
 
   ElementRegion(SVal Idx, const MemRegion* sReg)
     : TypedRegion(sReg, ElementRegionKind), Index(Idx) {
-    // The index must be signed.
-    if (nonloc::ConcreteInt* CI = dyn_cast<nonloc::ConcreteInt>(&Idx))
-      assert(CI->getValue().isSigned());
+    assert(isa<nonloc::ConcreteInt>(&Idx) &&
+           cast<nonloc::ConcreteInt>(&Idx)->getValue().isSigned() &&
+           "The index must be signed");
   }
 
   static void ProfileRegion(llvm::FoldingSetNodeID& ID, SVal Idx, 





More information about the cfe-commits mailing list