[clang] [clang][SafeBuffers] Add -Wunsafe-buffer-usage-main-argv to allow ignoring main() argument warnings (PR #229871)

via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 15:45:58 PDT 2026


================
@@ -2550,11 +2562,24 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler {
              "Variables blamed for unsafe buffer usage without suggestions!");
       S.Diag(Loc, diag::note_unsafe_buffer_operation) << MsgParam << Range;
     } else {
+      bool IsMainArg = false;
+      if (D) { llvm::errs() << "Decl is: " << D->getDeclKindName() << "\n"; } else { llvm::errs() << "Decl is NULL\n"; }
----------------
shreya-jain wrote:

Removed

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


More information about the cfe-commits mailing list