mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +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
Notes:
sideshowbarker
2024-07-17 21:43:20 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/ed3cb888985 Pull-request: https://github.com/SerenityOS/serenity/pull/11587
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(-Wdeprecated-copy)
|
||||
add_compile_options(-Wduplicated-cond)
|
||||
add_compile_options(-Wno-expansion-to-defined)
|
||||
add_compile_options(-Wformat=2)
|
||||
add_compile_options(-Wimplicit-fallthrough)
|
||||
add_compile_options(-Wlogical-op)
|
||||
|
@ -191,6 +190,8 @@ add_compile_options(-g1)
|
|||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
add_compile_options(-Wno-literal-suffix)
|
||||
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(-Wdouble-promotion)
|
||||
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
|
||||
|
|
Loading…
Reference in a new issue