Skip to content

Commit 448b5e1

Browse files
tbaederrgithub-actions[bot]
authored andcommitted
Automerge: [clang][bytecode] Fix OptionScope initializer (#155149)
Initialize the `OldToLValue` member with the actual old value of `ToLValue`. Pointed out by Shafik in llvm/llvm-project#153601 (comment)
2 parents 1a4ccd9 + c540678 commit 448b5e1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/AST/ByteCode/Compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ template <class Emitter> class OptionScope final {
6262
OptionScope(Compiler<Emitter> *Ctx, bool NewDiscardResult,
6363
bool NewInitializing, bool NewToLValue)
6464
: Ctx(Ctx), OldDiscardResult(Ctx->DiscardResult),
65-
OldInitializing(Ctx->Initializing), OldToLValue(NewToLValue) {
65+
OldInitializing(Ctx->Initializing), OldToLValue(Ctx->ToLValue) {
6666
Ctx->DiscardResult = NewDiscardResult;
6767
Ctx->Initializing = NewInitializing;
6868
Ctx->ToLValue = NewToLValue;

0 commit comments

Comments
 (0)