[libc-commits] [libc] [libc] [Task] Prepare to enable disabled warnings (PR #122835)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Jan 21 09:16:44 PST 2025
================
@@ -25,34 +25,53 @@ function(_get_common_test_compile_options output_var c_test flags)
list(APPEND compile_options "-ffixed-point")
endif()
- # list(APPEND compile_options "-Wall")
- # list(APPEND compile_options "-Wextra")
+ list(APPEND compile_options "-Wall")
+ list(APPEND compile_options "-Wextra")
# -DLIBC_WNO_ERROR=ON if you can't build cleanly with -Werror.
if(NOT LIBC_WNO_ERROR)
- # list(APPEND compile_options "-Werror")
+ list(APPEND compile_options "-Werror")
+
+ # TODO (https://github.com/llvm/llvm-project/issues/122367#issuecomment-2581374103)
+ list(APPEND compile_options "-Wno-unused-command-line-argument")
+
+ # TODO (https://github.com/llvm/llvm-project/issues/123434)
+ list(APPEND compile_options "-Wno-missing-field-initializers")
endif()
- # list(APPEND compile_options "-Wconversion")
- # list(APPEND compile_options "-Wno-sign-conversion")
- # list(APPEND compile_options "-Wimplicit-fallthrough")
- # list(APPEND compile_options "-Wwrite-strings")
- # list(APPEND compile_options "-Wextra-semi")
+ list(APPEND compile_options "-Wconversion")
+ list(APPEND compile_options "-Wno-sign-conversion")
+ list(APPEND compile_options "-Wimplicit-fallthrough")
+ list(APPEND compile_options "-Wwrite-strings")
+ list(APPEND compile_options "-Wextra-semi")
# Silence this warning because _Complex is a part of C99.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT c_test)
list(APPEND compile_options "-fext-numeric-literals")
endif()
- else()
+ elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang$")
----------------
nickdesaulniers wrote:
How come you use `MATCHES` with `$` rather than `STREQUAL` without `$`?
https://github.com/llvm/llvm-project/pull/122835
More information about the libc-commits
mailing list