]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Add "option" field to GNAT's -fdiagnostics-format=json output
authorGhjuvan Lacambre <lacambre@adacore.com>
Wed, 27 Apr 2022 13:01:28 +0000 (15:01 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 30 May 2022 08:29:05 +0000 (08:29 +0000)
commita4db870e1b042ac6ab7ddaef6e2d3e32408578dd
treee85df6679b5babce37b96516d155e64cba4b9697
parent8244b8034201bfb0609eaa33fe3a4a2518dfdb3d
[Ada] Add "option" field to GNAT's -fdiagnostics-format=json output

This enables better integration with tools that handle GNAT's output.

gcc/ada/

* erroutc.ads (Get_Warning_Option): New function returning the
option responsible for a warning if it exists.
* erroutc.adb (Get_Warning_Option): Likewise.
(Get_Warning_Tag): Rely on Get_Warning_Option when possible.
* errout.adb (Output_JSON_Message): Emit option field.
gcc/ada/errout.adb
gcc/ada/erroutc.adb
gcc/ada/erroutc.ads