Skip to content

Commit 0df46c4

Browse files
committed
Revert "[CMake] Disable more noisy GCC warnings (#159044)"
This reverts commit 984be7c.
1 parent 984be7c commit 0df46c4

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

llvm/cmake/modules/HandleLLVMOptions.cmake

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -911,22 +911,6 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
911911
endif()
912912
endif()
913913

914-
# Disable -Warray-bounds on GCC; this warning exists since a very long time,
915-
# but since GCC 11, it produces a lot of very noisy, seemingly false positive
916-
# warnings (potentially originating in libstdc++).
917-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
918-
append("-Wno-array-bounds" CMAKE_CXX_FLAGS)
919-
endif()
920-
921-
# Disable -Wstringop-overread on GCC; this warning produces a number of very
922-
# noisy diagnostics when -Warray-bounds is disabled above; this option exists
923-
# since GCC 11.
924-
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
925-
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 11.1)
926-
append("-Wno-stringop-overread" CMAKE_CXX_FLAGS)
927-
endif()
928-
endif()
929-
930914
# The LLVM libraries have no stable C++ API, so -Wnoexcept-type is not useful.
931915
append("-Wno-noexcept-type" CMAKE_CXX_FLAGS)
932916

0 commit comments

Comments
 (0)