mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[cmake] Enable Clang warnings about redundant semicolons
This matches what GCC warns about when -pedantic is enabled. This should avoid such redundant semicolons creeping into the codebase. Differential Revision: https://reviews.llvm.org/D98941
This commit is contained in:
parent
210266842f
commit
4ac2184d3a
@ -668,6 +668,11 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL))
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user