[clang] [Clang][Diagnose] New feature: Nested/Indented diagnostic message in sarif mode. (PR #174106)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 9 06:11:17 PST 2026
anonymouspc wrote:
> ## Pull request overview
> This PR introduces nested/indented diagnostic messages for SARIF format output in Clang. The feature organizes diagnostics in a tree structure where errors and warnings can have child notes hierarchically attached, similar to GCC's SARIF implementation. This makes the diagnostic output more structured and machine-parsable.
>
> **Key changes:**
>
> * Introduced a tree-based data structure (`SARIFDiagnostic::Node`) to logically represent nested diagnostics
> * Extended SARIF format with `SarifChildResult` class to physically represent child diagnostics as `relatedLocations` with nesting levels
> * Refactored diagnostic statistics printing to use a virtual method pattern
>
> ### Reviewed changes
> Copilot reviewed 12 out of 12 changed files in this pull request and generated 9 comments.
>
> Show a summary per file
> 💡 [Add Copilot custom instructions](/llvm/llvm-project/new/main/.github/instructions?filename=*.instructions.md) for smarter, more guided reviews. [Learn how to get started](https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot).
Who told you to review my code??? What happened to GitHub?
https://github.com/llvm/llvm-project/pull/174106
More information about the cfe-commits
mailing list