]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: move diagnostic_context to diagnostics::context in its own header
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:39 +0000 (15:13 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:39 +0000 (15:13 -0400)
commit0661b7bfdcaa24f8d2a8b709b23299ac06702eb4
tree1d65f8c939ee273daa379a1e309beca7a41cf6b7
parent0c0cb2f00c0e9e9d46059561c3ae8c0cc12be41b
diagnostics: move diagnostic_context to diagnostics::context in its own header

No functional change intended.

gcc/ada/ChangeLog:
* gcc-interface/misc.cc: Update for diagnostic_context becoming
diagnostics::context.

gcc/analyzer/ChangeLog:
* program-point.cc: : Update for diagnostic_context becoming
diagnostics::context, and for diagnostic_source_print_policy
becoming diagnostics::source_print_policy.

gcc/c-family/ChangeLog:
* c-common.h: Update for diagnostic_context becoming
diagnostics::context.
* c-opts.cc: Likewise.

gcc/c/ChangeLog:
* c-objc-common.cc: Update for diagnostic_context becoming
diagnostics::context.
* c-tree.h: Likewise.

gcc/ChangeLog:
* coretypes.h: Update for diagnostic_context becoming
diagnostics::context.
* diagnostic-global-context.cc: Likewise.
* diagnostic.cc: Likewise.  Also for diagnostic_option_classifier
becoming diagnostics::option_classifier.
* diagnostic.h (diagnostic_text_starter_fn): Rename to...
(diagnostics::text_starter_fn): ...this, and move to
diagnostics/context.h.
(get_printer): Rename to...
(diagnostics::get_printer): ...this, and move to
diagnostics/context.h.
(class diagnostic_option_manager): Rename to...
(class diagnostics::option_manager): ...this, and move to
diagnostics/context.h.
(class diagnostic_option_classifier): Rename to...
(class diagnostics::option_classifier): ...this, and move to
diagnostics/context.h.
(struct diagnostic_source_printing_options): Rename to...
(struct diagnostics::source_printing_options): ...this, and move
to diagnostics/context.h.
(class diagnostic_column_policy): Rename to...
(class diagnostics::column_policy): ...this, and move to
diagnostics/context.h.
(class diagnostic_location_print_policy): Rename to...
(class diagnostics::location_print_policy): ...this, and move to
diagnostics/context.h.
(class html_label_writer): Rename to...
(class diagnostics::html_label_writer): ...this, and move to
diagnostics/context.h.
(class diagnostic_source_print_policy): Rename to...
(class diagnostics::source_print_policy): ...this, and move to
diagnostics/context.h.
(struct diagnostic_counters): Rename to...
(struct diagnostics::counters): ...this, and move to
diagnostics/context.h.
(class diagnostic_context): Rename to...
(class diagnostics::context): ...this, and move to
diagnostics/context.h.
(diagnostic_text_starter): Rename to...
(diagnostics::text_starter): ...this, and move to
diagnostics/context.h.
(diagnostic_start_span): Rename to...
(diagnostics::start_span): ...this, and move to
diagnostics/context.h.
(diagnostic_text_finalizer): Rename to...
(diagnostics::text_finalizer): ...this, and move to
diagnostics/context.h.
Include "diagnostics/context.h".
* diagnostics/buffering.h: Update for diagnostic_context becoming
diagnostics::context; similarly for diagnostic_counters.
* diagnostics/client-data-hooks.h: Likewise.
* diagnostics/context.h: New file, taken from material in
diagnostic.h.
* diagnostics/html-sink.cc: : Update for diagnostic_context
becoming diagnostics::context.
* diagnostics/html-sink.h: Likewise.
* diagnostics/lazy-paths.cc: Likewise for
diagnostic_option_manager.
* diagnostics/output-file.h: Likewise for diagnostic_context.
* diagnostics/output-spec.cc: Likewise.
* diagnostics/output-spec.h: Likewise.
* diagnostics/paths-output.cc: Likewise.
* diagnostics/sarif-sink.cc: Likewise.
* diagnostics/sarif-sink.h: Likewise.
* diagnostics/sink.h: Likewise.
* diagnostics/source-printing.cc: Likewise.
* diagnostics/text-sink.cc: Likewise.
* diagnostics/text-sink.h: Likewise.
* gcc-rich-location.h: Likewise.
* gcc.cc: Likewise.
* gdbinit.in: Likewise.
* langhooks-def.h: Likewise.
* langhooks.cc: Likewise.
* langhooks.h: Likewise.
* libgdiagnostics.cc: Likewise.
* optc-gen.awk: Likewise.
* opth-gen.awk: Likewise.
* opts-common.cc: Likewise.
* opts-diagnostic.cc: Likewise.
* opts-diagnostic.h: Likewise.
* opts-global.cc: Likewise.
* opts.cc: Likewise.
* opts.h: Likewise.
* selftest-diagnostic.cc: Likewise.
* selftest-diagnostic.h: Likewise.
* toplev.cc: Likewise.
* tree-diagnostic-client-data-hooks.cc: Likewise.
* tree-diagnostic.cc: Likewise.
* tree-diagnostic.h: Likewise.

gcc/cp/ChangeLog:
* cp-tree.h: Update for diagnostic_context becoming
diagnostics::context.
* error.cc: Likewise.
* module.cc: Likewise.

gcc/fortran/ChangeLog:
* error.cc: Update for diagnostic_context becoming
diagnostics::context.

gcc/jit/ChangeLog:
* dummy-frontend.cc: Update for diagnostic_context becoming
diagnostics::context.
* jit-playback.h: Likewise.

gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-expr.cc: Update for diagnostic_text_finalizer
becoming diagnostics::text_finalizer.
* resolve/rust-late-name-resolver-2.0.cc: Likewise.

gcc/testsuite/ChangeLog:
* g++.dg/plugin/show_template_tree_color_plugin.cc: Update for
moves to namespace diagnostics.
* gcc.dg/plugin/diagnostic_group_plugin.cc: Likewise.
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Likewise.
* gcc.dg/plugin/location_overflow_plugin.cc: Likewise.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
59 files changed:
gcc/ada/gcc-interface/misc.cc
gcc/analyzer/program-point.cc
gcc/c-family/c-common.h
gcc/c-family/c-opts.cc
gcc/c/c-objc-common.cc
gcc/c/c-tree.h
gcc/coretypes.h
gcc/cp/cp-tree.h
gcc/cp/error.cc
gcc/cp/module.cc
gcc/diagnostic-global-context.cc
gcc/diagnostic.cc
gcc/diagnostic.h
gcc/diagnostics/buffering.h
gcc/diagnostics/client-data-hooks.h
gcc/diagnostics/context.h [new file with mode: 0644]
gcc/diagnostics/html-sink.cc
gcc/diagnostics/html-sink.h
gcc/diagnostics/lazy-paths.cc
gcc/diagnostics/output-file.h
gcc/diagnostics/output-spec.cc
gcc/diagnostics/output-spec.h
gcc/diagnostics/paths-output.cc
gcc/diagnostics/sarif-sink.cc
gcc/diagnostics/sarif-sink.h
gcc/diagnostics/sink.h
gcc/diagnostics/source-printing.cc
gcc/diagnostics/text-sink.cc
gcc/diagnostics/text-sink.h
gcc/fortran/error.cc
gcc/gcc-rich-location.h
gcc/gcc.cc
gcc/gdbinit.in
gcc/jit/dummy-frontend.cc
gcc/jit/jit-playback.h
gcc/langhooks-def.h
gcc/langhooks.cc
gcc/langhooks.h
gcc/libgdiagnostics.cc
gcc/optc-gen.awk
gcc/opth-gen.awk
gcc/opts-common.cc
gcc/opts-diagnostic.cc
gcc/opts-diagnostic.h
gcc/opts-global.cc
gcc/opts.cc
gcc/opts.h
gcc/rust/resolve/rust-ast-resolve-expr.cc
gcc/rust/resolve/rust-late-name-resolver-2.0.cc
gcc/selftest-diagnostic.cc
gcc/selftest-diagnostic.h
gcc/testsuite/g++.dg/plugin/show_template_tree_color_plugin.cc
gcc/testsuite/gcc.dg/plugin/diagnostic_group_plugin.cc
gcc/testsuite/gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc
gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc
gcc/toplev.cc
gcc/tree-diagnostic-client-data-hooks.cc
gcc/tree-diagnostic.cc
gcc/tree-diagnostic.h