[clang] [clang][Wunsafe-buffer-usage] Add -Wunsafe-buffer-usage-in-static-sized-array (PR #176466)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 16 12:29:14 PST 2026


================
@@ -689,6 +690,12 @@ static bool isSafeArraySubscript(const ArraySubscriptExpr &Node,
     return false;
   }
 
+  if (IgnoreStaticSizedArrays) {
----------------
mxms0 wrote:

I did think about that - and it looks like -fsanitize-=array-bounds _does_ cover string literals? https://godbolt.org/z/fhEfd7aKT 

https://github.com/llvm/llvm-project/pull/176466


More information about the cfe-commits mailing list