diff --git a/lldb/unittests/API/CMakeLists.txt b/lldb/unittests/API/CMakeLists.txt index 8bdc806878239..06ac49244176c 100644 --- a/lldb/unittests/API/CMakeLists.txt +++ b/lldb/unittests/API/CMakeLists.txt @@ -16,6 +16,17 @@ if (CXX_SUPPORTS_DOCUMENTATION) PRIVATE -Wdocumentation) endif() +# Apply -Wno-documentation-deprecated-sync while we migrate away from +# report_fatal_error in llvm/include/llvm/Support/ErrorHandling.h +# and llvm/include/llvm/Support/Error.h. +# Remove this block of code when the migration is complete. +# See https://github.com/llvm/llvm-project/issues/138914. +check_cxx_compiler_flag("-Wno-documentation-deprecated-sync" + CXX_SUPPORTS_NO_DOCUMENTATION_DEPRECATED_SYNC) +if (CXX_SUPPORTS_NO_DOCUMENTATION_DEPRECATED_SYNC) + target_compile_options(APITests + PRIVATE -Wno-documentation-deprecated-sync) +endif() if(Python3_RPATH) set_property(TARGET APITests APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")