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

Yanzuo Liu via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 14 20:34:06 PST 2026


================
@@ -0,0 +1,264 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "UnsafeFormatStringCheck.h"
+#include "../utils/OptionsUtils.h"
+#include "clang/ASTMatchers/ASTMatchFinder.h"
+#include "llvm/Support/ConvertUTF.h"
+#include <string>
+
+using namespace clang::ast_matchers;
+
+namespace clang::tidy::bugprone {
+
+static constexpr llvm::StringLiteral OptionNameCustomPrintfFunctions =
----------------
zwuis wrote:

Use `StringRef`. See #172765.

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


More information about the cfe-commits mailing list