Commit Graph

3 Commits

Author SHA1 Message Date
Yabin Cui 4e6b071509 Fix clang version check in SARIF diagnostics test
This is to allow future clang versions and use of LLVM_VERSION_PATCH.

Differential Revision: https://reviews.llvm.org/D135896
2022-10-13 15:16:58 -04:00
Aaron Ballman b345be177d Make this test slightly less fragile; NFC
The rule IDs are not stable, so this uses a regex for the rule ids
instead of concrete values. It also moves the CHECK lines below the
code so that it's easier to modify the test in the future. It also
breaks the CHECK lines into multiple lines to improve the performance
of the test and aid in debugging failures. Finally, it adds a comment
to the top of the test explaining that things are still rather fragile.
2022-08-29 09:41:23 -04:00
Abraham Corea Diaz 82e893c47c [clang] Enable output of SARIF diagnostics
Enables Clang to emit diagnostics in SARIF format when
`-fdiagnostics-format=sarif`. Adds a new DiagnosticConsumer named
SARIFDiagnosticPrinter and a new DiagnosticRenderer named SARIFDiagnostic
to constuct and emit a SARIF object containing the run's basic diagnostic info.

Reviewed By: cjdb, denik, aaron.ballman

Differential Revision: https://reviews.llvm.org/D131632
2022-08-26 18:49:29 +00:00