[PATCH] D146654: [clang] replaces numeric SARIF ids with heirarchical names

Christopher Di Bella via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 22 11:46:01 PDT 2023


cjdb created this revision.
cjdb added reviewers: aaron.ballman, vaibhav.y, denik.
Herald added a project: All.
cjdb requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Per §3.27.5 and §3.27.7, the `rule.id` and `ruleId` properties need to
be heirarchical names (this is only a requirement of `rule.id`, but they
need to match when both are present). We've been using the enum values
for these properties up until now, but that's neither conforming nor
stable, so we've changed it to a dotted version of the enum identifiers
(which are substantially more stable than their numeric values).

Fixes #61597.
Depends on D145201 <https://reviews.llvm.org/D145201>.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146654

Files:
  clang/include/clang/Basic/Diagnostic.h
  clang/include/clang/Basic/DiagnosticIDs.h
  clang/include/clang/Frontend/ASTUnit.h
  clang/lib/Basic/Diagnostic.cpp
  clang/lib/Basic/DiagnosticIDs.cpp
  clang/lib/Frontend/ASTUnit.cpp
  clang/lib/Frontend/SARIFDiagnostic.cpp
  clang/test/Frontend/sarif-diagnostics.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146654.507454.patch
Type: text/x-patch
Size: 15286 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230322/322f1458/attachment.bin>


More information about the cfe-commits mailing list