[all-commits] [llvm/llvm-project] 2759e4: [clang-repl] We do not need to call new in the obj...
Vassil Vassilev via All-commits
all-commits at lists.llvm.org
Sat Jan 20 17:00:50 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2759e47067ea286f6302adcfe93b653cfaf6f2eb
https://github.com/llvm/llvm-project/commit/2759e47067ea286f6302adcfe93b653cfaf6f2eb
Author: Vassil Vassilev <v.g.vassilev at gmail.com>
Date: 2024-01-20 (Sat, 20 Jan 2024)
Changed paths:
M clang/unittests/Interpreter/InterpreterTest.cpp
Log Message:
-----------
[clang-repl] We do not need to call new in the object allocation. (#78843)
This test demonstrates template instantiation via the interpreter code.
In order to do that we can allocate the object on the stack and extend
its lifetime by boxing it into a clang::Value.
That avoids the subtle problem where we call the new operator on an
object only known to the interpreter and we cannot destroy it from
compiled code since there is not suitable facility in clang::Value yet.
That should resolve the asan issues that was reported in
llvm/llvm-project#76218.
More information about the All-commits
mailing list