[all-commits] [llvm/llvm-project] a1fcdd: [clang][ssaf] Add SARIF transformation-report form...

Jan Korous via All-commits all-commits at lists.llvm.org
Thu Jul 9 14:59:43 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1fcdd1a7a6943fca3d109a31d4d47d2cbd14e75
      https://github.com/llvm/llvm-project/commit/a1fcdd1a7a6943fca3d109a31d4d47d2cbd14e75
  Author: Jan Korous <jkorous at apple.com>
  Date:   2026-07-09 (Thu, 09 Jul 2026)

  Changed paths:
    A clang/include/clang/ScalableStaticAnalysis/SourceTransformation/SARIFTransformationReportFormat.h
    M clang/lib/ScalableStaticAnalysis/SourceTransformation/CMakeLists.txt
    A clang/lib/ScalableStaticAnalysis/SourceTransformation/SARIFTransformationReportFormat.cpp
    M clang/unittests/ScalableStaticAnalysis/CMakeLists.txt
    A clang/unittests/ScalableStaticAnalysis/SourceTransformation/SARIFFormatTest.cpp

  Log Message:
  -----------
  [clang][ssaf] Add SARIF transformation-report format (#208327)

Adds the built-in `TransformationReportFormat`, registered under the
file extension `sarif`. The writer drives clang's existing
`SarifDocumentWriter` (`clang/Basic/Sarif.h`) to produce a SARIF 2.1.0
JSON document. The tool driver name is `clang-ssaf`; the long `fullName`
carries the transformation's name.

Token-range `CharSourceRange`s are canonicalized to char ranges via
`clang::Lexer::getAsCharRange` before being attached to results; invalid
ranges (including default-constructed ones) are treated as "no location"
— the writer omits the result's `locations` key rather than fabricating
one. Source edits are not embedded in the report; the writer never emits
a `fix` or `fixes` key.

Anchored via `SSAFSARIFTransformationReportFormatAnchorSource` so static
builds keep the registration.

Assisted-By: Claude Opus 4.7



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list