Create an interface for writing SARIF documents from within clang. The primary intent of this change is to introduce the interface clang::SarifDocumentWriter, which allows incrementally adding diagnostic properties to a JSON backed document. The proposed interface is not yet connected to the compiler internals, which will be covered in future work. As such this change will not change the input/output interface of clang beyond recognizing -fdiagnostics=sarif as a valid argument.
This change adds the follow features:
- no-op flag -fdiagnostics-format=sarif
- Interface for SARIF writer
Previous discussions:
- RFC for this change: https://lists.llvm.org/pipermail/cfe-dev/2021-March/067907.html
- https://lists.llvm.org/pipermail/cfe-dev/2021-July/068480.html
SARIF Standard (2.1.0):
clang-tidy: warning: header guard does not follow preferred style [llvm-header-guard]
not useful