[libc-commits] [libc] [libc] Build with -Wshadow (PR #196519)
Nico Weber via libc-commits
libc-commits at lists.llvm.org
Sun May 10 07:19:44 PDT 2026
https://github.com/nico updated https://github.com/llvm/llvm-project/pull/196519
>From 39d85eb46637b50e9c6cef9df08b618cb124ab5f Mon Sep 17 00:00:00 2001
From: Nico Weber <thakis at chromium.org>
Date: Thu, 7 May 2026 11:09:47 -0400
Subject: [PATCH] [libc] Build with -Wshadow
---
libc/cmake/modules/LLVMLibCCompileOptionRules.cmake | 1 +
1 file changed, 1 insertion(+)
diff --git a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
index 2d3703eefa0ac..db541a4dfb985 100644
--- a/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
+++ b/libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
@@ -301,6 +301,7 @@ function(_get_common_compile_options output_var flags)
if(NOT CMAKE_COMPILER_IS_GNUCXX)
list(APPEND compile_options "-Wnewline-eof")
list(APPEND compile_options "-Wnonportable-system-include-path")
+ list(APPEND compile_options "-Wshadow")
list(APPEND compile_options "-Wstrict-prototypes")
list(APPEND compile_options "-Wthread-safety")
list(APPEND compile_options "-Wglobal-constructors")
More information about the libc-commits
mailing list