[libc-commits] [libc] 5207451 - [libc] Compile with -Wconversion -Wno-sign-conversion

Roland McGrath via libc-commits libc-commits at lists.llvm.org
Wed Aug 9 12:46:31 PDT 2023


Author: Roland McGrath
Date: 2023-08-09T12:46:20-07:00
New Revision: 5207451dd03e91873d696b883ac49f11f7687862

URL: https://github.com/llvm/llvm-project/commit/5207451dd03e91873d696b883ac49f11f7687862
DIFF: https://github.com/llvm/llvm-project/commit/5207451dd03e91873d696b883ac49f11f7687862.diff

LOG: [libc] Compile with -Wconversion -Wno-sign-conversion

This more closely matches the stricter warnings used for
this same code in the Fuchsia build.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D156630

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCObjectRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index 5c76cf285e6371..49d7b94c43fbef 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -30,6 +30,8 @@ function(_get_common_compile_options output_var flags)
     list(APPEND compile_options "-fno-rtti")
     list(APPEND compile_options "-Wall")
     list(APPEND compile_options "-Wextra")
+    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")


        


More information about the libc-commits mailing list