Author: Timm Bäder Date: 2023-01-11T13:05:14+01:00 New Revision: 3696941dae5cc5bb379c50eae6190e29f7edbbb1
URL: https://github.com/llvm/llvm-project/commit/3696941dae5cc5bb379c50eae6190e29f7edbbb1 DIFF: https://github.com/llvm/llvm-project/commit/3696941dae5cc5bb379c50eae6190e29f7edbbb1.diff LOG: [clang][Interp][NFC] Add an assertion This is unnecessary in the current state of the interpreter, but will ne important later. Added: Modified: clang/lib/AST/Interp/ByteCodeExprGen.h Removed: ################################################################################ diff --git a/clang/lib/AST/Interp/ByteCodeExprGen.h b/clang/lib/AST/Interp/ByteCodeExprGen.h index f817fb4aedef..4e4f2eecd172 100644 --- a/clang/lib/AST/Interp/ByteCodeExprGen.h +++ b/clang/lib/AST/Interp/ByteCodeExprGen.h @@ -359,6 +359,7 @@ template <class Emitter> class ExprScope final : public LocalScope<Emitter> { ExprScope(ByteCodeExprGen<Emitter> *Ctx) : LocalScope<Emitter>(Ctx) {} void addExtended(const Scope::Local &Local) override { + assert(this->Parent); this->Parent->addLocal(Local); } }; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits