[clang] [-Wunsafe-buffer-usage] Separate flag for format-attributed functions (PR #175749)

Hans Wennborg via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 19 01:26:57 PST 2026


================
@@ -2523,7 +2523,12 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {
   void handleUnsafeLibcCall(const CallExpr *Call, unsigned PrintfInfo,
                             ASTContext &Ctx,
                             const Expr *UnsafeArg = nullptr) override {
-    S.Diag(Call->getBeginLoc(), diag::warn_unsafe_buffer_libc_call)
+    unsigned DiagID = diag::warn_unsafe_buffer_libc_call;
+    if (PrintfInfo & 0x8) {
----------------
zmodem wrote:

Done.

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


More information about the cfe-commits mailing list