]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: SARIF output: add "{start,end}TimeUtc" properties (§§3.20.7-8)
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 24 Jul 2024 22:07:55 +0000 (18:07 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 24 Jul 2024 22:07:55 +0000 (18:07 -0400)
commitb4693ce3a0565bb75d0d5698f2ce2ffc53d1ff84
tree1c7d2991d04b943555aa858027f677686e12fac7
parent29ee588129bf07d3adb62b6c2c189ba932c00ff4
diagnostics: SARIF output: add "{start,end}TimeUtc" properties (§§3.20.7-8)

gcc/ChangeLog:
* diagnostic-format-sarif.cc
(make_date_time_string_for_current_time): New.
(sarif_invocation::sarif_invocation): Set "startTimeUtc"
property (§3.20.7).
(sarif_invocation::prepare_to_flush): Set "endTimeUtc"
property (§3.20.8).

gcc/testsuite/ChangeLog:
* c-c++-common/diagnostic-format-sarif-file-1.c: Verify that we have
"startTimeUtc" and "endTimeUtc" properties of the correct form.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/diagnostic-format-sarif.cc
gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-1.c