https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072
>From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max <maksim.leven...@gmail.com> Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/2] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cpp | 2 +- clang/test/Interpreter/execute.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 7968c62cbd3e7b3..ddfbc9ac01c6743 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( - void* operator new(__SIZE_TYPE__, void* __p) noexcept; + #include <new> void *__clang_Interpreter_SetValueWithAlloc(void*, void*, void*); void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*); void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*, void*); diff --git a/clang/test/Interpreter/execute.cpp b/clang/test/Interpreter/execute.cpp index 6e73ed3927e8155..d54ab99749c1bac 100644 --- a/clang/test/Interpreter/execute.cpp +++ b/clang/test/Interpreter/execute.cpp @@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast<unsigned long long inline int foo() { return 42; } int r3 = foo(); +#include <memory> + %quit >From b3c62d0d295129ad94f94fc641e789038c78f03a Mon Sep 17 00:00:00 2001 From: Maksim Levental <maksim.leven...@gmail.com> Date: Sat, 14 Oct 2023 19:26:04 -0500 Subject: [PATCH 2/2] Update clang/lib/Interpreter/Interpreter.cpp Remove include new Co-authored-by: Vassil Vassilev <v.g.vassi...@gmail.com> --- clang/lib/Interpreter/Interpreter.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index ddfbc9ac01c6743..30348e1c03f8c76 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -248,7 +248,6 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( - #include <new> void *__clang_Interpreter_SetValueWithAlloc(void*, void*, void*); void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*); void __clang_Interpreter_SetValueNoAlloc(void*, void*, void*, void*); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits