From: Chris Lattner Date: Fri, 12 Dec 2008 07:16:09 +0000 (+0000) Subject: silence warning in release-asserts mode about unused variable, also X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=43b28d07019bc78447ecbbb721526de4ffd83f20;p=clang 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 --- 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,