[llvm] [libc++] Activate -Warray-zero when building (PR #110812)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 2 03:07:48 PDT 2024


https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/110812

>From b7cc66ea6e94dd70f105a663d27b350dd734b01c Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton at mozilla.com>
Date: Wed, 2 Oct 2024 11:44:42 +0200
Subject: [PATCH] [libc++] Activate -Warray-zero when building

---
 runtimes/cmake/Modules/WarningFlags.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/runtimes/cmake/Modules/WarningFlags.cmake b/runtimes/cmake/Modules/WarningFlags.cmake
index 068d22150d3875..90edf3a9574380 100644
--- a/runtimes/cmake/Modules/WarningFlags.cmake
+++ b/runtimes/cmake/Modules/WarningFlags.cmake
@@ -23,6 +23,7 @@ function(cxx_add_warning_flags target enable_werror enable_pedantic)
       -Wundef
       -Wunused-template
       -Wformat-nonliteral
+      -Wzero-length-array
       )
 
   if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")



More information about the llvm-commits mailing list