mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:17:35 +00:00
Meta: Enable -Wexpansion-to-defined warning for Clang
The Clang implementation of this warning protects against some undefined pre-processor behavior while ignoring function-like macros. The gcc implementation also warns on function-like macros, and is therefore noisy.
This commit is contained in:
parent
ba2ca54660
commit
ed3cb88898
1 changed files with 2 additions and 1 deletions
|
@ -164,7 +164,6 @@ add_compile_options(-Wno-address-of-packed-member)
|
||||||
add_compile_options(-Wcast-qual)
|
add_compile_options(-Wcast-qual)
|
||||||
add_compile_options(-Wdeprecated-copy)
|
add_compile_options(-Wdeprecated-copy)
|
||||||
add_compile_options(-Wduplicated-cond)
|
add_compile_options(-Wduplicated-cond)
|
||||||
add_compile_options(-Wno-expansion-to-defined)
|
|
||||||
add_compile_options(-Wformat=2)
|
add_compile_options(-Wformat=2)
|
||||||
add_compile_options(-Wimplicit-fallthrough)
|
add_compile_options(-Wimplicit-fallthrough)
|
||||||
add_compile_options(-Wlogical-op)
|
add_compile_options(-Wlogical-op)
|
||||||
|
@ -191,6 +190,8 @@ add_compile_options(-g1)
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||||
add_compile_options(-Wno-literal-suffix)
|
add_compile_options(-Wno-literal-suffix)
|
||||||
add_compile_options(-Wno-maybe-uninitialized)
|
add_compile_options(-Wno-maybe-uninitialized)
|
||||||
|
# Only ignore expansion-to-defined for g++, clang's implementation doesn't complain about function-like macros
|
||||||
|
add_compile_options(-Wno-expansion-to-defined)
|
||||||
add_compile_options(-Wcast-align)
|
add_compile_options(-Wcast-align)
|
||||||
add_compile_options(-Wdouble-promotion)
|
add_compile_options(-Wdouble-promotion)
|
||||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue