]>
Commit | Line | Data |
---|---|---|
75d62394 | 1 | /* SARIF output for diagnostics. |
a945c346 | 2 | Copyright (C) 2023-2024 Free Software Foundation, Inc. |
75d62394 DM |
3 | Contributed by David Malcolm <dmalcolm@redhat.com>. |
4 | ||
5 | This file is part of GCC. | |
6 | ||
7 | GCC is free software; you can redistribute it and/or modify it under | |
8 | the terms of the GNU General Public License as published by the Free | |
9 | Software Foundation; either version 3, or (at your option) any later | |
10 | version. | |
11 | ||
12 | GCC is distributed in the hope that it will be useful, but WITHOUT ANY | |
13 | WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 | for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
18 | along with GCC; see the file COPYING3. If not see | |
19 | <http://www.gnu.org/licenses/>. */ | |
20 | ||
21 | #ifndef GCC_DIAGNOSTIC_FORMAT_SARIF_H | |
22 | #define GCC_DIAGNOSTIC_FORMAT_SARIF_H | |
23 | ||
24 | #include "json.h" | |
25 | ||
26 | /* Concrete subclass of json::object for SARIF property bags | |
27 | (SARIF v2.1.0 section 3.8). */ | |
28 | ||
29 | class sarif_property_bag : public json::object | |
30 | { | |
31 | }; | |
32 | ||
33 | /* Concrete subclass of json::object for SARIF objects that can | |
34 | contain property bags (as per SARIF v2.1.0 section 3.8.1, which has: | |
35 | "In addition to those properties that are explicitly documented, every | |
36 | object defined in this document MAY contain a property named properties | |
37 | whose value is a property bag.") */ | |
38 | ||
39 | class sarif_object : public json::object | |
40 | { | |
41 | public: | |
42 | sarif_property_bag &get_or_create_properties (); | |
43 | }; | |
44 | ||
45 | #endif /* ! GCC_DIAGNOSTIC_FORMAT_SARIF_H */ |