Author: Timm Baeder Date: 2025-08-25T12:55:34+02:00 New Revision: c540678920f6ef606b1dbb252a7ad39dd838f78f
URL: https://github.com/llvm/llvm-project/commit/c540678920f6ef606b1dbb252a7ad39dd838f78f DIFF: https://github.com/llvm/llvm-project/commit/c540678920f6ef606b1dbb252a7ad39dd838f78f.diff LOG: [clang][bytecode] Fix OptionScope initializer (#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 Added: Modified: clang/lib/AST/ByteCode/Compiler.cpp Removed: ################################################################################ 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