From 43b28d07019bc78447ecbbb721526de4ffd83f20 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 12 Dec 2008 07:16:09 +0000 Subject: [PATCH] silence warning in release-asserts mode about unused variable, also move comment into assert message. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60938 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Analysis/PathSensitive/MemRegion.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/Analysis/PathSensitive/MemRegion.h b/include/clang/Analysis/PathSensitive/MemRegion.h index 90f295d1f9..50d084f22b 100644 --- a/include/clang/Analysis/PathSensitive/MemRegion.h +++ b/include/clang/Analysis/PathSensitive/MemRegion.h @@ -420,9 +420,9 @@ class ElementRegion : public TypedRegion { ElementRegion(SVal Idx, const MemRegion* sReg) : TypedRegion(sReg, ElementRegionKind), Index(Idx) { - // The index must be signed. - if (nonloc::ConcreteInt* CI = dyn_cast(&Idx)) - assert(CI->getValue().isSigned()); + assert(isa(&Idx) && + cast(&Idx)->getValue().isSigned() && + "The index must be signed"); } static void ProfileRegion(llvm::FoldingSetNodeID& ID, SVal Idx, -- 2.50.1