[clang] [clang][analyzer] Add AllowWithoutC11 option to DeprecatedOrUnsafeBuf… (PR #168704)
Endre Fülöp via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 26 05:10:57 PST 2025
================
@@ -1785,6 +1768,13 @@ security.insecureAPI.DeprecatedOrUnsafeBufferHandling (C)
strncpy(buf, "a", 1); // warn
}
+The ``AllowWithoutC11`` option allows reporting warnings for these functions even when not compiling with C11 standard. These functions are deprecated in C11, but may still be problematic in earlier C standards.
+
+To enable this option, use:
+``-analyzer-config security.insecureAPI.DeprecatedOrUnsafeBufferHandling:AllowWithoutC11=true``.
+
+By default, this option is set to *false*.
+
----------------
gamesh411 wrote:
IMO it would be best to have a discourse to collect our thoughts there, and I have created one:
https://discourse.llvm.org/t/rfc-report-modes-for-unsafe-function-reporting/88971
https://github.com/llvm/llvm-project/pull/168704
More information about the cfe-commits
mailing list