diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-12 07:16:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-12 07:16:09 +0000 |
commit | 43b28d07019bc78447ecbbb721526de4ffd83f20 (patch) | |
tree | 8cbdef64f28ac2f8e16b50b8bce5b80b8535a7f6 | |
parent | 47a2b40b7a3d9c89d6c3d12e5a81e2498c207750 (diff) |
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
-rw-r--r-- | include/clang/Analysis/PathSensitive/MemRegion.h | 6 |
1 files 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<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, |