[all-commits] [llvm/llvm-project] 6546fd: [clang] Emit SARIF Diagnostics: Create `clang::Sar...

Vaibhav Yenamandra via All-commits all-commits at lists.llvm.org
Fri Jun 24 04:18:25 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6546fdbe36fd1227d7f23f89fd9a9825813b3de9
  Author: Vaibhav Yenamandra <vyenamandra at bloomberg.net>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    A clang/include/clang/Basic/Sarif.h
    M clang/include/clang/Basic/SourceLocation.h
    M clang/lib/Basic/CMakeLists.txt
    A clang/lib/Basic/Sarif.cpp
    M clang/lib/Basic/SourceLocation.cpp
    M clang/unittests/Basic/CMakeLists.txt
    A clang/unittests/Basic/SarifTest.cpp

  Log Message:
  [clang] Emit SARIF Diagnostics: Create `clang::SarifDocumentWriter` interface

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 data 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.

This change also introduces the clang::FullSourceRange type that is
modeled after clang::SourceRange + clang::FullSourceLoc, this is useful
for packaging a pair of clang::SourceLocation objects with their
corresponding SourceManagers.

Previous discussions:

RFC for this change: https://lists.llvm.org/pipermail/cfe-dev/2021-March/067907.html
SARIF Standard (2.1.0):


Differential Revision: https://reviews.llvm.org/D109701

More information about the All-commits mailing list