Skip to content

Commit 53a87b4

Browse files
committed
[clang-repl] Disable LSan in clang-repl.
https://llvm.org/github.com/llvm/llvm-project/issues/67586.
1 parent 0d8b864 commit 53a87b4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

clang/tools/clang-repl/ClangRepl.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@
2424
#include "llvm/Support/TargetSelect.h"
2525
#include <optional>
2626

27+
// Disable LSan for this test.
28+
// FIXME: Re-enable once we can assume GCC 13.2 or higher.
29+
// https://llvm.org/github.com/llvm/llvm-project/issues/67586.
30+
#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD
31+
#include <sanitizer/lsan_interface.h>
32+
LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
33+
#endif
34+
2735
static llvm::cl::opt<bool> CudaEnabled("cuda", llvm::cl::Hidden);
2836
static llvm::cl::opt<std::string> CudaPath("cuda-path", llvm::cl::Hidden);
2937
static llvm::cl::opt<std::string> OffloadArch("offload-arch", llvm::cl::Hidden);

0 commit comments

Comments
 (0)