[clang] [clang] [diagnostics] Add `-fdiagnostics-add-output` switch for SARIF (PR #185201)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 9 04:10:06 PDT 2026


================
@@ -360,7 +403,9 @@ IntrusiveRefCntPtr<DiagnosticsEngine> CompilerInstance::createDiagnostics(
   if (Client) {
     Diags->setClient(Client, ShouldOwnClient);
   } else if (Opts.getFormat() == DiagnosticOptions::SARIF) {
-    Diags->setClient(new SARIFDiagnosticPrinter(llvm::errs(), Opts));
+    /* TO_UPSTREAM(SARIF) ON */
----------------
steakhal wrote:

Were these special comments intentional here?
Same for the comments a few lines below.

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


More information about the cfe-commits mailing list