vitalybuka added a comment.

In D159167#4651325 <https://reviews.llvm.org/D159167#4651325>, @lhames wrote:

> @vitalybuka If we want to disable this test for now, what's the canonical way 
> to do it? Should we just wrap the whole `add_clang_unittest` block in the 
> conditional?
>
>   # export_executable_symbols triggers Lsan report.                           
>                                                                               
>                                                                               
>                                                        
>   if (NOT LLVM_USE_SANITIZER MATCHES ".*Address.*")
>   
>     add_clang_unittest(ClangReplInterpreterExceptionTests
>       InterpreterExceptionTest.cpp
>       )
>   
>     llvm_update_compile_flags(ClangReplInterpreterExceptionTests)
>     target_link_libraries(ClangReplInterpreterExceptionTests PUBLIC
>       clangAST
>       clangBasic
>       clangInterpreter
>       clangFrontend
>       )
>     add_dependencies(ClangReplInterpreterExceptionTests 
> clang-resource-headers)
>   
>     export_executable_symbols(ClangReplInterpreterExceptionTests)
>   endif()

This should work.

Also you can

  #if LLVM_HWADDRESS_SANITIZER_BUILD || LLVM_ADDRESS_SANITIZER_BUILD
  #  define MAYBE_MyTest DISABLED_MyTest
  #else
  #  define MAYBE_MyTest MyTest
  #endif

But here we have just one test case

Also you can try disable only lsan, link time:

  #if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_HWADDRESS_SANITIZER_BUILD
  #include <sanitizer/lsan_interface.h>
  LLVM_ATTRIBUTE_USED int __lsan_is_turned_off() { return 1; }
  #endif


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159167/new/

https://reviews.llvm.org/D159167

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to