diff --git a/clang/lib/AST/Interp/InterpState.cpp b/clang/lib/AST/Interp/InterpState.cpp index bd7daf38796ca6..abc29e059aa9f0 100644 --- a/clang/lib/AST/Interp/InterpState.cpp +++ b/clang/lib/AST/Interp/InterpState.cpp @@ -46,7 +46,10 @@ bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) { } void InterpState::deallocate(Block *B) { - Descriptor *Desc = B->getDescriptor(); + assert(B); + const Descriptor *Desc = B->getDescriptor(); + assert(Desc); + if (B->hasPointers()) { size_t Size = B->getSize();