https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/155149
Initialize the `OldToLValue` member with the actual old value of `ToLValue`. Pointed out by Shafik in https://github.com/llvm/llvm-project/pull/153601#discussion_r2294319428 >From 19ac8a199e70b1a7c3be1598db9a5ecf28de9737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbae...@redhat.com> Date: Sun, 24 Aug 2025 10:31:30 +0200 Subject: [PATCH] [clang][bytecode] Fix OptionScope initializer Initialize the `OldToLValue` member with the actual old value of `ToLValue`. Pointed out by Shafik in https://github.com/llvm/llvm-project/pull/153601#discussion_r2294319428 --- clang/lib/AST/ByteCode/Compiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/AST/ByteCode/Compiler.cpp b/clang/lib/AST/ByteCode/Compiler.cpp index e3235d34e230e..c36cb644282d8 100644 --- a/clang/lib/AST/ByteCode/Compiler.cpp +++ b/clang/lib/AST/ByteCode/Compiler.cpp @@ -62,7 +62,7 @@ template <class Emitter> class OptionScope final { OptionScope(Compiler<Emitter> *Ctx, bool NewDiscardResult, bool NewInitializing, bool NewToLValue) : Ctx(Ctx), OldDiscardResult(Ctx->DiscardResult), - OldInitializing(Ctx->Initializing), OldToLValue(NewToLValue) { + OldInitializing(Ctx->Initializing), OldToLValue(Ctx->ToLValue) { Ctx->DiscardResult = NewDiscardResult; Ctx->Initializing = NewInitializing; Ctx->ToLValue = NewToLValue; _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits