]> git.ipfire.org Git - thirdparty/gcc.git/commit
sarif-replay: fix off-by-one in handling of "endColumn" (§3.30.8) [PR118792]
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 11 Feb 2025 13:54:15 +0000 (08:54 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 11 Feb 2025 13:54:15 +0000 (08:54 -0500)
commite8c5013b6b7820d77edc45d04e634d49b20c05ce
tree43753a177a808ed6e9c36ceb87aa7090edcdc8fd
parent0f8fd6b336161ed0582edb08dbe6ea1932290a75
sarif-replay: fix off-by-one in handling of "endColumn" (§3.30.8) [PR118792]

gcc/ChangeLog:
PR sarif-replay/118792
* libsarifreplay.cc (sarif_replayer::handle_region_object): Fix
off-by-one in handling of endColumn property so that the code
matches the comment and the SARIF spec (§3.30.8).

gcc/testsuite/ChangeLog:
PR sarif-replay/118792
* sarif-replay.dg/2.1.0-valid/error-with-note.sarif: Update
expected output to reflect fix to off-by-one error in handling of
"endColumn" property.
* sarif-replay.dg/2.1.0-valid/malloc-vs-local-4.c.sarif: Likewise.
* sarif-replay.dg/2.1.0-valid/signal-1.c.moved.sarif: Likewise.
* sarif-replay.dg/2.1.0-valid/signal-1.c.sarif: Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/libsarifreplay.cc
gcc/testsuite/sarif-replay.dg/2.1.0-valid/error-with-note.sarif
gcc/testsuite/sarif-replay.dg/2.1.0-valid/malloc-vs-local-4.c.sarif
gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1.c.moved.sarif
gcc/testsuite/sarif-replay.dg/2.1.0-valid/signal-1.c.sarif