diff options
author | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2023-06-26 09:57:21 -0700 |
commit | aa1e672b5d99102b03eb5fb9c51609c45f62bff7 (patch) | |
tree | 886212591b1c9d127eaaf234a4a2e22452ea384a /gcc/diagnostic.h | |
parent | 97e31a0a2a2d2273687fcdb4e5416aab1a2186e1 (diff) | |
parent | 3a39a31b8ae9c6465434aefa657f7fcc86f905c0 (diff) | |
download | gcc-devel/gccgo.zip gcc-devel/gccgo.tar.gz gcc-devel/gccgo.tar.bz2 |
Merge from trunk revision 3a39a31b8ae9c6465434aefa657f7fcc86f905c0.devel/gccgo
Diffstat (limited to 'gcc/diagnostic.h')
-rw-r--r-- | gcc/diagnostic.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/diagnostic.h b/gcc/diagnostic.h index 9a51097..00b828f 100644 --- a/gcc/diagnostic.h +++ b/gcc/diagnostic.h @@ -24,6 +24,11 @@ along with GCC; see the file COPYING3. If not see #include "pretty-print.h" #include "diagnostic-core.h" +namespace text_art +{ + class theme; +} // namespace text_art + /* An enum for controlling what units to use for the column number when diagnostics are output, used by the -fdiagnostics-column-unit option. Tabs will be expanded or not according to the value of -ftabstop. The origin @@ -170,6 +175,7 @@ class edit_context; namespace json { class value; } class diagnostic_client_data_hooks; class logical_location; +class diagnostic_diagram; /* This data structure bundles altogether any information relevant to the context of a diagnostic message. */ @@ -417,6 +423,18 @@ struct diagnostic_context Used by SARIF output to give metadata about the client that's producing diagnostics. */ diagnostic_client_data_hooks *m_client_data_hooks; + + /* Support for diagrams. */ + struct + { + /* Theme to use when generating diagrams. + Can be NULL (if text art is disabled). */ + text_art::theme *m_theme; + + /* Callback for emitting diagrams. */ + void (*m_emission_cb) (diagnostic_context *context, + const diagnostic_diagram &diagram); + } m_diagrams; }; inline void @@ -619,4 +637,7 @@ extern bool warning_enabled_at (location_t, int); extern char *get_cwe_url (int cwe); +extern void diagnostic_emit_diagram (diagnostic_context *context, + const diagnostic_diagram &diagram); + #endif /* ! GCC_DIAGNOSTIC_H */ |