diff options
-rw-r--r-- | clang/include/clang/Analysis/PathSensitive/MemRegion.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/include/clang/Analysis/PathSensitive/MemRegion.h b/clang/include/clang/Analysis/PathSensitive/MemRegion.h index 50d084f22b7..5da0ccafc24 100644 --- a/clang/include/clang/Analysis/PathSensitive/MemRegion.h +++ b/clang/include/clang/Analysis/PathSensitive/MemRegion.h @@ -420,8 +420,8 @@ class ElementRegion : public TypedRegion { ElementRegion(SVal Idx, const MemRegion* sReg) : TypedRegion(sReg, ElementRegionKind), Index(Idx) { - assert(isa<nonloc::ConcreteInt>(&Idx) && - cast<nonloc::ConcreteInt>(&Idx)->getValue().isSigned() && + assert((!isa<nonloc::ConcreteInt>(&Idx) || + cast<nonloc::ConcreteInt>(&Idx)->getValue().isSigned()) && "The index must be signed"); } |