Skip to content

Commit 47218ea

Browse files
[lldb] Use -Wno-documentation-deprecated-sync if available (#138909)
report_fatal_error has been marked "@deprecated" in its comment, but the function itself is not marked with [[deprecated]] yet. This causes warnings like: llvm/include/llvm/Support/ErrorHandling.h:61:6: error: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Werror,-Wdocumentation-deprecated-sync] llvm/include/llvm/Support/Error.h:738:6: error: declaration is marked with '@deprecated' command but does not have a deprecation attribute [-Werror,-Wdocumentation-deprecated-sync] This patch disables the warning while we migrate away from report_fatal_error.
1 parent 8810595 commit 47218ea

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lldb/unittests/API/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ if (CXX_SUPPORTS_DOCUMENTATION)
1616
PRIVATE -Wdocumentation)
1717
endif()
1818

19+
# Apply -Wno-documentation-deprecated-sync while we migrate away from
20+
# report_fatal_error in llvm/include/llvm/Support/ErrorHandling.h
21+
# and llvm/include/llvm/Support/Error.h.
22+
# Remove this block of code when the migration is complete.
23+
# See https://github.com/llvm/llvm-project/issues/138914.
24+
check_cxx_compiler_flag("-Wno-documentation-deprecated-sync"
25+
CXX_SUPPORTS_NO_DOCUMENTATION_DEPRECATED_SYNC)
26+
if (CXX_SUPPORTS_NO_DOCUMENTATION_DEPRECATED_SYNC)
27+
target_compile_options(APITests
28+
PRIVATE -Wno-documentation-deprecated-sync)
29+
endif()
1930

2031
if(Python3_RPATH)
2132
set_property(TARGET APITests APPEND PROPERTY BUILD_RPATH "${Python3_RPATH}")

0 commit comments

Comments
 (0)