GCC Middle and Back End API Reference
diagnostic-info.h
Go to the documentation of this file.
1/* Various declarations for language-independent diagnostics subroutines.
2 Copyright (C) 2000-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 under
7the terms of the GNU General Public License as published by the Free
8Software Foundation; either version 3, or (at your option) any later
9version.
10
11GCC is distributed in the hope that it will be useful, but WITHOUT ANY
12WARRANTY; without even the implied warranty of MERCHANTABILITY or
13FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14for 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 GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
21#define GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H
22
23namespace diagnostics {
24
25class metadata;
26
27/* A diagnostic is described by the MESSAGE to send, the FILE and LINE of
28 its context and its KIND (ice, error, warning, note, ...) See complete
29 list in diagnostics/kinds.def. */
30
32{
34 : m_message (),
35 m_richloc (),
36 m_metadata (),
37 m_x_data (),
38 m_kind (),
39 m_option_id (),
40 m_iinfo ()
41 { }
42
43 /* Text to be formatted. */
45
46 /* The location at which the diagnostic is to be reported. */
47 rich_location *m_richloc;
48
49 /* An optional bundle of metadata associated with the diagnostic
50 (or NULL). */
52
53 /* Auxiliary data for client. */
54 void *m_x_data;
55 /* The kind of diagnostic it is about. */
57 /* Which OPT_* directly controls this diagnostic. */
59
60 /* Inlining context containing locations for each call site along
61 the inlining stack. */
63 {
64 /* Locations along the inlining stack. */
66 /* The abstract origin of the location. */
67 void *m_ao;
68 /* Set if every M_ILOCS element is in a system header. */
71};
72
73} // namespace diagnostics
74
75#endif /* ! GCC_DIAGNOSTICS_DIAGNOSTIC_INFO_H */
Definition vec.h:1667
Definition metadata.h:41
Definition coretypes.h:167
kind
Definition kinds.h:27
Definition diagnostic-info.h:63
void * m_ao
Definition diagnostic-info.h:67
auto_vec< location_t, 8 > m_ilocs
Definition diagnostic-info.h:65
bool m_allsyslocs
Definition diagnostic-info.h:69
diagnostic_info()
Definition diagnostic-info.h:33
const metadata * m_metadata
Definition diagnostic-info.h:51
kind m_kind
Definition diagnostic-info.h:56
struct diagnostics::diagnostic_info::inlining_info m_iinfo
rich_location * m_richloc
Definition diagnostic-info.h:47
text_info m_message
Definition diagnostic-info.h:44
option_id m_option_id
Definition diagnostic-info.h:58
void * m_x_data
Definition diagnostic-info.h:54
Definition option-id.h:32
Definition pretty-print.h:34