[PATCH] D98941: [cmake] Enable Clang warnings about redundant semicolons
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 19 09:49:18 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfa65f77cbcd: [cmake] Enable Clang warnings about redundant semicolons (authored by mstorsjo).
Changed prior to commit:
https://reviews.llvm.org/D98941?vs=331828&id=331909#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98941/new/
https://reviews.llvm.org/D98941
Files:
llvm/cmake/modules/HandleLLVMOptions.cmake
Index: llvm/cmake/modules/HandleLLVMOptions.cmake
===================================================================
--- llvm/cmake/modules/HandleLLVMOptions.cmake
+++ llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -668,6 +668,11 @@
if (LLVM_ENABLE_PEDANTIC AND LLVM_COMPILER_IS_GCC_COMPATIBLE)
append("-pedantic" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
append("-Wno-long-long" CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
+
+ # GCC warns about redundant toplevel semicolons (enabled by -pedantic
+ # above), while Clang doesn't. Enable the corresponding Clang option to
+ # pick up on these even in builds with Clang.
+ add_flag_if_supported("-Wc++98-compat-extra-semi" CXX98_COMPAT_EXTRA_SEMI_FLAG)
endif()
add_flag_if_supported("-Wimplicit-fallthrough" IMPLICIT_FALLTHROUGH_FLAG)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98941.331909.patch
Type: text/x-patch
Size: 793 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210319/ee5de39f/attachment.bin>
More information about the llvm-commits
mailing list