https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118881
Bug ID: 118881
Summary: sarif-replay doesn't yet handle "annotations"
(§3.28.6)
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: sarif-replay
Assignee: dmalcolm at gcc dot gnu.org
Reporter: dmalcolm at gcc dot gnu.org
Target Milestone: ---
We're capturing labelled ranges/secondary locations in our SARIF output via
"annotations" (§3.28.6), but sarif-replay doesn't currently do anything with
tha property.
Consider this textual output from cc1:
../../src/gcc/testsuite/gcc.dg/bad-binary-ops-highlight-colors.c: In function
‘test_4’:
../../src/gcc/testsuite/gcc.dg/bad-binary-ops-highlight-colors.c:19:23: error:
invalid operands to binary + (have ‘S’ {aka ‘struct s’} and ‘T’ {aka ‘struct
t’})
19 | return callee_4a () + callee_4b ();
| ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
| | |
| | T {aka struct t}
| S {aka struct s}
When the above is saved with -fdiagnostics-add-output=sarif, sarif-replay emits
just:
In function 'test_4':
../../src/gcc/testsuite/gcc.dg/bad-binary-ops-highlight-colors.c:19:23: error:
invalid operands to binary + (have ‘S’ {aka ‘struct s’} and ‘T’ {aka ‘struct
t’}) [error]
19 | return callee_4a () + callee_4b ();
| ^
i.e. it's missing the labelled ranges.