File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,8 +73,11 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
7373 add_compile_options_safe (-Wno-thread-safety-negative )
7474 add_compile_options_safe (-Wno-thread-safety-beta )
7575
76- # TODO: enable
77- add_compile_options_safe (-Wno-lifetime-safety-intra-tu-suggestions )
76+ # we do not add the annotation until C++20
77+ # the warnings were introduced with Clang 23
78+ if (CMAKE_CXX_STANDARD LESS 20)
79+ add_compile_options_safe (-Wno-lifetime-safety-intra-tu-suggestions )
80+ endif ()
7881 add_compile_options_safe (-Wno-lifetime-safety-intra-tu-constructor-suggestions )
7982 add_compile_options_safe (-Wno-lifetime-safety-cross-tu-constructor-suggestions )
8083
@@ -88,6 +91,7 @@ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
8891 # we are not interested in these
8992 set_source_files_properties (test .cpp PROPERTIES COMPILE_FLAGS "-Wno-multichar -Wno-four-char-constants" )
9093
94+ # TODO: check for proper AppleClang version
9195 if (CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 14 OR CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 14)
9296 # TODO: verify this regression still exists in clang-15
9397 if (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo" )
You can’t perform that action at this time.
0 commit comments