GCC Middle and Back End API Reference
libsarifreplay.h
Go to the documentation of this file.
1/* A pure C API for replaying SARIF as diagnostics.
2 Copyright (C) 2023-2025 Free Software Foundation, Inc.
3
4This file is part of GCC.
5
6GCC is free software; you can redistribute it and/or modify it
7under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 3, or (at your option)
9any later version.
10
11GCC is distributed in the hope that it will be useful, but
12WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GCC; see the file COPYING3. If not see
18<http://www.gnu.org/licenses/>. */
19
20#ifndef LIBSARIFREPLAY_H
21#define LIBSARIFREPLAY_H
22
23#include "libgdiagnostics.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif /* __cplusplus */
28
37
38/* Attempt to load a .sarif file from SARIF_FILE, and
39 replay the diagnostics to OUTPUT_MANAGER.
40 Report any problems to CONTROL_MANAGER (such as
41 file-not-found, malformed .sarif, etc).
42 If ALLOW_JSON_COMMENTS is true, then allow C/C++ style comments
43 in the file.
44 If ECHO_FILE, then dump the filename and contents to stderr. */
45
46extern int
47sarif_replay_path (const char *sarif_file,
48 diagnostic_manager *output_manager,
49 diagnostic_manager *control_manager,
55
56#ifdef __cplusplus
57}
58#endif /* __cplusplus */
59
60#endif /* LIBSARIFREPLAY_H */
#define LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL(ARG_NUM)
Definition libgdiagnostics.h:47
diagnostic_colorize
Definition libgdiagnostics.h:92
int sarif_replay_path(const char *sarif_file, diagnostic_manager *output_manager, diagnostic_manager *control_manager, const replay_options *options) LIBGDIAGNOSTICS_PARAM_MUST_BE_NON_NULL(4)
Definition libsarifreplay.cc:2727
Definition libgdiagnostics.cc:638
Definition gengtype.h:179
Definition libsarifreplay.h:30
bool m_debug_physical_locations
Definition libsarifreplay.h:34
bool m_json_comments
Definition libsarifreplay.h:32
enum diagnostic_colorize m_diagnostics_colorize
Definition libsarifreplay.h:35
bool m_echo_file
Definition libsarifreplay.h:31
bool m_verbose
Definition libsarifreplay.h:33