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,
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits