]> git.ipfire.org Git - thirdparty/gcc.git/commit
diagnostics: move/rename output formats to diagnostics as "sinks"
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:37 +0000 (15:13 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 25 Jul 2025 19:13:37 +0000 (15:13 -0400)
commit5ac3308484c78a7c4fa2a798df587a8bd507f030
tree652198b68e05b0c300dc67624ba94dbce4b9b3ba
parent5b64ba693f5cbc8ecb57ec10a248c137434237a7
diagnostics: move/rename output formats to diagnostics as "sinks"

Within gcc/
  move diagnostic-buffer.h to diagnostics/buffering.h
  move diagnostic-format-html.cc to diagnostics/html-sink.cc
  move diagnostic-format-html.h to diagnostics/html-sink.h
  move diagnostic-format-sarif.cc to diagnostics/sarif-sink.cc
  move diagnostic-format-sarif.h to diagnostics/sarif-sink.h
  move diagnostic-format.h to diagnostics/sink.h
  move diagnostic-format-text.cc to diagnostics/text-sink.cc
  move diagnostic-format-text.h to diagnostics/text-sink.h

renaming various types including:
  Old name:                       New name:
  diagnostic_output_format        diagnostics::sink
  diagnostic_buffer               diagnostics::buffer
  diagnostic_per_format_buffer    diagnostics::per_sink_buffer
  diagnostic_text_output_format   diagnostics::text_sink
  sarif_output_format             diagnostics::sarif_sink
  diagnostic_sarif_format_buffer  diagnostics::sarif_sink_buffer
  html_output_format              diagnostics::html_sink
  diagnostic_html_format_buffer   diagnostics::html_sink_buffer

No functional change intended.

gcc/ChangeLog:
* Makefile.in (OBJS): Replace diagnostic-format-html.o with
diagnostics/html-sink.o, diagnostic-format-sarif.o with
diagnostics/sarif-sink.o, and diagnostic-format-text.o with
diagnostics/text-sink.o.
* coretypes.h (class diagnostic_text_output_format): Replace
with...
(class diagnostics::text_sink): ...this.
* diagnostic-global-context.cc: Update for move of diagnostics
output formats into namespace "diagnostics", as "sinks".
* diagnostic-macro-unwinding.cc: Likewise.
* diagnostic-macro-unwinding.h: Likewise.
* diagnostic-show-locus.cc: Likewise.
* diagnostic.cc: Likewise.
* diagnostic.h: Likewise.
* diagnostic-buffer.h: Rename to...
* diagnostics/buffering.h: ...this, updating for above changes.
* diagnostics/client-data-hooks.h: Likewise.
* diagnostics/digraphs.cc: Likewise.
* diagnostic-format-html.cc: Rename to...
* diagnostics/html-sink.cc: ...this, updating for above changes.
* diagnostic-format-html.h: Rename to...
* diagnostics/html-sink.h: ...this, updating for above changes.
* diagnostics/lazy-paths.cc: Likewise.
* diagnostics/metadata.h: Likewise.
* diagnostics/output-spec.cc: Likewise.
* diagnostics/output-spec.h: Likewise.
* diagnostics/paths-output.cc: Likewise.
* diagnostics/paths.h: Likewise.
* diagnostic-format-sarif.cc: Rename to...
* diagnostics/sarif-sink.cc: ...this, updating for above changes.
* diagnostic-format-sarif.h: Rename to...
* diagnostics/sarif-sink.h: ...this, updating for above changes.
* diagnostic-format.h: Rename to...
* diagnostics/sink.h: ...this, updating for above changes.
* diagnostics/state-graphs-to-dot.cc: Likewise.
* diagnostic-format-text.cc: Rename to...
* diagnostics/text-sink.cc: ...this, updating for above changes.
* diagnostic-format-text.h: Rename to...
* diagnostics/text-sink.h: ...this, updating for above changes.
* gcc.cc: Likewise.
* langhooks-def.h: Likewise.
* langhooks.cc: Likewise.
* langhooks.h: Likewise.
* libgdiagnostics.cc: Likewise.
* opts-diagnostic.cc: Likewise.
* opts.cc: Likewise.
* selftest-diagnostic.cc: Likewise.
* selftest-run-tests.cc: Likewise.
* selftest.h: Likewise.
* tree-diagnostic-client-data-hooks.cc: Likewise.
* tree-diagnostic.cc: Likewise.

gcc/analyzer/ChangeLog:
* ana-state-to-diagnostic-state.cc: Update for move of
diagnostics output formats into namespace "diagnostics" as
"sinks".
* bounds-checking.cc: Likewise.
* call-details.cc: Likewise.
* checker-event.cc: Likewise.
* checker-event.h: Likewise.
* diagnostic-manager.cc: Likewise.
* diagnostic-manager.h: Likewise.
* infinite-loop.cc: Likewise.
* infinite-recursion.cc: Likewise.
* pending-diagnostic.h: Likewise.
* region-model.cc: Likewise.
* sm-taint.cc: Likewise.

gcc/c-family/ChangeLog:
* c-opts.cc: Update for move of diagnostics output formats into
namespace "diagnostics" as "sinks".

gcc/cp/ChangeLog:
* cp-tree.h: Update for move of diagnostics output formats into
namespace "diagnostics" as "sinks".
* error.cc: Likewise.

gcc/fortran/ChangeLog:
* error.cc: Update for move of diagnostics output formats into
namespace "diagnostics" as "sinks".
* gfortran.h: Likewise.

gcc/jit/ChangeLog:
* dummy-frontend.cc: Update for move of diagnostics output formats
into namespace "diagnostics" as "sinks".

gcc/rust/ChangeLog:
* resolve/rust-ice-finalizer.cc: Update for move of diagnostics
output formats into namespace "diagnostics" as "sinks".
* resolve/rust-ice-finalizer.h: Likewise.

gcc/testsuite/ChangeLog:
* gcc.dg/plugin/diagnostic_group_plugin.cc: Update for move of
diagnostics output formats into namespace "diagnostics" as
"sinks".
* gcc.dg/plugin/diagnostic_plugin_test_show_locus.cc: Likewise.
* gcc.dg/plugin/location_overflow_plugin.cc: Likewise.

libcc1/ChangeLog:
* context.cc: Update for move of diagnostics output formats into
namespace "diagnostics" as "sinks".

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
61 files changed:
gcc/Makefile.in
gcc/analyzer/ana-state-to-diagnostic-state.cc
gcc/analyzer/bounds-checking.cc
gcc/analyzer/call-details.cc
gcc/analyzer/checker-event.cc
gcc/analyzer/checker-event.h
gcc/analyzer/diagnostic-manager.cc
gcc/analyzer/diagnostic-manager.h
gcc/analyzer/infinite-loop.cc
gcc/analyzer/infinite-recursion.cc
gcc/analyzer/pending-diagnostic.h
gcc/analyzer/region-model.cc
gcc/analyzer/sm-taint.cc
gcc/c-family/c-opts.cc
gcc/coretypes.h
gcc/cp/cp-tree.h
gcc/cp/error.cc
gcc/diagnostic-global-context.cc
gcc/diagnostic-macro-unwinding.cc
gcc/diagnostic-macro-unwinding.h
gcc/diagnostic-show-locus.cc
gcc/diagnostic.cc
gcc/diagnostic.h
gcc/diagnostics/buffering.h [moved from gcc/diagnostic-buffer.h with 72% similarity]
gcc/diagnostics/client-data-hooks.h
gcc/diagnostics/digraphs.cc
gcc/diagnostics/html-sink.cc [moved from gcc/diagnostic-format-html.cc with 93% similarity]
gcc/diagnostics/html-sink.h [moved from gcc/diagnostic-format-html.h with 82% similarity]
gcc/diagnostics/lazy-paths.cc
gcc/diagnostics/metadata.h
gcc/diagnostics/output-spec.cc
gcc/diagnostics/output-spec.h
gcc/diagnostics/paths-output.cc
gcc/diagnostics/paths.h
gcc/diagnostics/sarif-sink.cc [moved from gcc/diagnostic-format-sarif.cc with 96% similarity]
gcc/diagnostics/sarif-sink.h [moved from gcc/diagnostic-format-sarif.h with 78% similarity]
gcc/diagnostics/sink.h [moved from gcc/diagnostic-format.h with 71% similarity]
gcc/diagnostics/state-graphs-to-dot.cc
gcc/diagnostics/text-sink.cc [moved from gcc/diagnostic-format-text.cc with 83% similarity]
gcc/diagnostics/text-sink.h [moved from gcc/diagnostic-format-text.h with 84% similarity]
gcc/fortran/error.cc
gcc/fortran/gfortran.h
gcc/gcc.cc
gcc/jit/dummy-frontend.cc
gcc/langhooks-def.h
gcc/langhooks.cc
gcc/langhooks.h
gcc/libgdiagnostics.cc
gcc/opts-diagnostic.cc
gcc/opts.cc
gcc/rust/resolve/rust-ice-finalizer.cc
gcc/rust/resolve/rust-ice-finalizer.h
gcc/selftest-diagnostic.cc
gcc/selftest-run-tests.cc
gcc/selftest.h
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/tree-diagnostic-client-data-hooks.cc
gcc/tree-diagnostic.cc
libcc1/context.cc