diff options
-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, |