https://github.com/nico created https://github.com/llvm/llvm-project/pull/95546
At least on my Windows machine, these two tests fail due to not being able to look up `??3@YAXPEAX_K@Z` (which is `void __cdecl operator delete(void *, unsigned __int64)` in demangled) after 130e93cc26ca. Since they don't test anything related to sized deallocation, just disable sized allocation for them. Possibly fixes #95451. >From 356f14cfb719898b6af28594d6ca5d564b54ade9 Mon Sep 17 00:00:00 2001 From: Nico Weber <tha...@chromium.org> Date: Fri, 14 Jun 2024 09:42:36 -0400 Subject: [PATCH] [clang-interp] Use -fno-sized-deallocation in two tests At least on my Windows machine, these two tests fail due to not being able to look up `??3@YAXPEAX_K@Z` (which is `void __cdecl operator delete(void *, unsigned __int64)` in demangled) after 130e93cc26ca. Since they don't test anything related to sized deallocation, just disable sized allocation for them. Possibly fixes #95451. --- clang/test/Interpreter/inline-virtual.cpp | 6 ++++-- clang/unittests/Interpreter/InterpreterTest.cpp | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/clang/test/Interpreter/inline-virtual.cpp b/clang/test/Interpreter/inline-virtual.cpp index d862b3354f61f..9c31208a4a642 100644 --- a/clang/test/Interpreter/inline-virtual.cpp +++ b/clang/test/Interpreter/inline-virtual.cpp @@ -3,8 +3,10 @@ // // We disable RTTI to avoid problems on Windows for non-RTTI builds of LLVM // where the JIT cannot find ??_7type_info@@6B@. -// RUN: cat %s | clang-repl -Xcc -fno-rtti | FileCheck %s -// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -O2 | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \ +// RUN: | FileCheck %s +// RUN: cat %s | clang-repl -Xcc -fno-rtti -Xcc -fno-sized-deallocation \ +// RUN: -Xcc -O2 | FileCheck %s extern "C" int printf(const char *, ...); diff --git a/clang/unittests/Interpreter/InterpreterTest.cpp b/clang/unittests/Interpreter/InterpreterTest.cpp index 683295a18d519..bbd854149d5f5 100644 --- a/clang/unittests/Interpreter/InterpreterTest.cpp +++ b/clang/unittests/Interpreter/InterpreterTest.cpp @@ -286,7 +286,8 @@ TEST_F(InterpreterTest, InstantiateTemplate) { // https://github.com/llvm/llvm-project/issues/94994. #ifndef __arm__ TEST_F(InterpreterTest, Value) { - std::unique_ptr<Interpreter> Interp = createInterpreter(); + std::vector<const char *> Args = {"-fno-sized-deallocation"}; + std::unique_ptr<Interpreter> Interp = createInterpreter(Args); Value V1; llvm::cantFail(Interp->ParseAndExecute("int x = 42;")); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits