[all-commits] [llvm/llvm-project] 8d4aa1: [clang][Interp] Update global temporaries at the e...
Timm Baeder via All-commits
all-commits at lists.llvm.org
Sat Jun 29 12:10:55 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8d4aa1f22ea08b12a7958b681e8a265f78cb349f
https://github.com/llvm/llvm-project/commit/8d4aa1f22ea08b12a7958b681e8a265f78cb349f
Author: Timm Bäder <tbaeder at redhat.com>
Date: 2024-06-29 (Sat, 29 Jun 2024)
Changed paths:
M clang/lib/AST/Interp/EvalEmitter.cpp
M clang/lib/AST/Interp/EvalEmitter.h
M clang/lib/AST/Interp/Interp.h
M clang/lib/AST/Interp/InterpState.h
A clang/test/AST/Interp/const-temporaries.cpp
Log Message:
-----------
[clang][Interp] Update global temporaries at the end of a declaration
When we create a global temporary variable via a
LifetimeExtendedTemporaryDecl, we have an expression to initialize it
with, so we evaluate that expression, convert it to an APValue and set
it on the LETD. However, when the value is updated after the
initialization, we don't propagate the new value to the LETD, which
means we will see an outdated value set on the LETD.
Fix this by keeping a list of seen LETDs and update them from the
global variable at the end of evaluation a declaration.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list