[clang-tools-extra] [clang-tidy] New bugprone-unsafe-format-string check (PR #168691)

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Sun Sep 27 02:45:41 PDT 2026


================
@@ -0,0 +1,5 @@
+// RUN: %check_clang_tidy %s bugprone-unsafe-format-string %t --\
+// RUN:  -config="{CheckOptions: {bugprone-unsafe-format-string.CustomPrintfFunctions: 'mysprintf, wrong-value; mylogger, 1', bugprone-unsafe-format-string.CustomScanfFunctions: 'myscanf, 0;'  }}"\
+// RUN: -- -isystem %S/Inputs/unsafe-format-string
+
+// CHECK-MESSAGES: warning: invalid configuration value for option
----------------
zwuis wrote:

Add new line at EOF.

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


More information about the cfe-commits mailing list