diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.cpp b/clang/lib/AST/Interp/ByteCodeExprGen.cpp index e4b48c4e946f1..a27a0cb2094ea 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.cpp +++ b/clang/lib/AST/Interp/ByteCodeExprGen.cpp @@ -1446,10 +1446,13 @@ bool ByteCodeExprGen::VisitPointerCompoundAssignOperator( if (!visit(RHS)) return false; - if (Op == BO_AddAssign) - this->emitAddOffset(*RT, E); - else - this->emitSubOffset(*RT, E); + if (Op == BO_AddAssign) { + if (!this->emitAddOffset(*RT, E)) + return false; + } else { + if (!this->emitSubOffset(*RT, E)) + return false; + } if (DiscardResult) return this->emitStorePopPtr(E);