[clang] Add -fdiagnostics-format=sarif option for future SARIF output
authorAbraham Corea Diaz <abrahamcd@google.com>
Thu, 21 Jul 2022 16:50:43 +0000 (16:50 +0000)
committerChristopher Di Bella <cjdb@google.com>
Thu, 21 Jul 2022 16:51:15 +0000 (16:51 +0000)
commit119d22310bd622d4b39e9760667b6fa58d15a8c5
tree59e34c7ce1c40639717916a22a815a6367d40734
parent66e01f47e46bcda11c4cbd942c7a7cafad1d38da
[clang] Add -fdiagnostics-format=sarif option for future SARIF output

Adds `sarif` option to the existing `-fdiagnostics-format` flag
for intended future work with SARIF diagnostics. Currently issues a warning
against the use of diagnostics in SARIF mode, then defaults to clang style for
diagnostics.

Reviewed By: cjdb, denik, aaron.ballman

Differential Revision: https://reviews.llvm.org/D129886
clang/include/clang/Basic/DiagnosticDriverKinds.td
clang/include/clang/Basic/DiagnosticOptions.h
clang/include/clang/Driver/Options.td
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Frontend/TextDiagnostic.cpp
clang/test/Driver/fdiagnostics-format-sarif.cpp [new file with mode: 0644]