[PATCH] D145284: WIP [clang] adds capabilities for SARIF to be written to file
Christopher Di Bella via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 3 16:13:39 PST 2023
cjdb created this revision.
cjdb added reviewers: aaron.ballman, erichkeane, shafik, dblaikie.
Herald added a project: All.
cjdb requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.
The original `-fdiagnostics-format=sarif` wrote directly to standard
error. This commit renames that mode to `sarif-stderr` and introduces a
`sarif-file` mode that allows the compiler to write `.sarif` files to
the current working directory. It also removes `SARIF` as an option so
that there's a single canonical approach for each option.
IMPORTANT: There are two different designs for writing SARIF to file,
so I've pulled the common parts of the design out into their own patch.
This ensures it only gets reviewed once, and so that the divergence is
apparent in the other two patches. Once a design is settled on, this
patch will be joined with the selected design.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D145284
Files:
clang/include/clang/Basic/DiagnosticOptions.def
clang/include/clang/Basic/DiagnosticOptions.h
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CompilerInstance.h
clang/include/clang/Frontend/SARIFDiagnosticPrinter.h
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/CompilerInstance.cpp
clang/lib/Frontend/FrontendAction.cpp
clang/lib/Frontend/SARIFDiagnosticPrinter.cpp
clang/lib/Frontend/TextDiagnostic.cpp
clang/lib/Tooling/Tooling.cpp
clang/test/Driver/fdiagnostics-format-sarif.cpp
clang/tools/driver/cc1_main.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145284.502304.patch
Type: text/x-patch
Size: 14884 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230304/6442d9da/attachment.bin>
More information about the cfe-commits
mailing list