https://gcc.gnu.org/g:1b5295431ed7007f4ef149a99f438cf21d71e042

commit r16-2537-g1b5295431ed7007f4ef149a99f438cf21d71e042
Author: David Malcolm <dmalc...@redhat.com>
Date:   Fri Jul 25 15:13:40 2025 -0400

    diagnostics: move gcc/selftest-diagnostic.{h,cc} -> 
gcc/diagnostics/selftest-context.{h,cc}
    
    No functional change intended.
    
    gcc/ChangeLog:
            * Makefile.in (OBJS-libcommon): Replace selftest-diagnostic.o with
            diagnostics/selftest-context.o.
            * diagnostic.cc: Update for move of selftest-diagnostic.h to
            diagnostics/selftest-context.h.
            * diagnostics/html-sink.cc: Likewise.
            * diagnostics/lazy-paths.cc: Likewise.
            * diagnostics/output-spec.cc: Likewise.
            * diagnostics/paths-output.cc: Likewise.
            * diagnostics/sarif-sink.cc: Likewise.
            * selftest-diagnostic.cc: Move to...
            * diagnostics/selftest-context.cc: ...here and update for move of
            header file.
            * selftest-diagnostic.h: Move to...
            * diagnostics/selftest-context.h: ...here.
            * diagnostics/source-printing.cc: Update for move of
            selftest-diagnostic.h to diagnostics/selftest-context.h.
    
    gcc/c-family/ChangeLog:
            * c-format.cc: Update for move of selftest-diagnostic.h to
            diagnostics/selftest-context.h.
    
    gcc/testsuite/ChangeLog:
            * gcc.dg/plugin/expensive_selftests_plugin.cc: Update for move of
            selftest-diagnostic.h to diagnostics/selftest-context.h.
    
    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Diff:
---
 gcc/Makefile.in                                                 | 3 ++-
 gcc/c-family/c-format.cc                                        | 2 +-
 gcc/diagnostic.cc                                               | 2 +-
 gcc/diagnostics/html-sink.cc                                    | 2 +-
 gcc/diagnostics/lazy-paths.cc                                   | 2 +-
 gcc/diagnostics/output-spec.cc                                  | 2 +-
 gcc/diagnostics/paths-output.cc                                 | 2 +-
 gcc/diagnostics/sarif-sink.cc                                   | 2 +-
 gcc/{selftest-diagnostic.cc => diagnostics/selftest-context.cc} | 2 +-
 gcc/{selftest-diagnostic.h => diagnostics/selftest-context.h}   | 6 +++---
 gcc/diagnostics/source-printing.cc                              | 2 +-
 gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.cc       | 2 +-
 12 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index a140d166b597..820cef5f4e48 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -1868,6 +1868,7 @@ OBJS-libcommon = diagnostic-spec.o diagnostic.o 
diagnostic-color.o \
        diagnostics/source-printing.o \
        diagnostics/state-graphs.o \
        diagnostics/state-graphs-to-dot.o \
+       diagnostics/selftest-context.o \
        diagnostics/selftest-logical-locations.o \
        diagnostics/selftest-paths.o \
        graphviz.o pex.o \
@@ -1876,7 +1877,7 @@ OBJS-libcommon = diagnostic-spec.o diagnostic.o 
diagnostic-color.o \
        xml.o \
        sbitmap.o \
        vec.o input.o hash-table.o ggc-none.o memory-block.o \
-       selftest.o selftest-diagnostic.o sort.o \
+       selftest.o sort.o \
        selftest-json.o \
        text-art/box-drawing.o \
        text-art/canvas.o \
diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc
index 80430e9a8f7c..d75b05df3a58 100644
--- a/gcc/c-family/c-format.cc
+++ b/gcc/c-family/c-format.cc
@@ -32,7 +32,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "substring-locations.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "builtins.h"
 #include "attribs.h"
 #include "c-family/c-type-mismatch.h"
diff --git a/gcc/diagnostic.cc b/gcc/diagnostic.cc
index ea606e34d2da..4d1b253bbe93 100644
--- a/gcc/diagnostic.cc
+++ b/gcc/diagnostic.cc
@@ -42,7 +42,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostics/text-sink.h"
 #include "diagnostics/edit-context.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "opts.h"
 #include "cpplib.h"
 #include "text-art/theme.h"
diff --git a/gcc/diagnostics/html-sink.cc b/gcc/diagnostics/html-sink.cc
index 0785046b5ae5..260f756edfa8 100644
--- a/gcc/diagnostics/html-sink.cc
+++ b/gcc/diagnostics/html-sink.cc
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostics/paths.h"
 #include "diagnostics/client-data-hooks.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "pretty-print-format-impl.h"
 #include "pretty-print-urlifier.h"
 #include "diagnostics/edit-context.h"
diff --git a/gcc/diagnostics/lazy-paths.cc b/gcc/diagnostics/lazy-paths.cc
index c30386f0b174..322ad786d114 100644
--- a/gcc/diagnostics/lazy-paths.cc
+++ b/gcc/diagnostics/lazy-paths.cc
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "diagnostics/lazy-paths.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "simple-diagnostic-path.h"
 #include "gcc-rich-location.h"
 #include "diagnostics/text-sink.h"
diff --git a/gcc/diagnostics/output-spec.cc b/gcc/diagnostics/output-spec.cc
index ecfa8e7ca610..699b5ac3bae7 100644
--- a/gcc/diagnostics/output-spec.cc
+++ b/gcc/diagnostics/output-spec.cc
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostics/text-sink.h"
 #include "diagnostics/sarif-sink.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "pretty-print-markup.h"
 #include "diagnostics/output-spec.h"
 
diff --git a/gcc/diagnostics/paths-output.cc b/gcc/diagnostics/paths-output.cc
index c409cce14cc8..1815223ee020 100644
--- a/gcc/diagnostics/paths-output.cc
+++ b/gcc/diagnostics/paths-output.cc
@@ -35,7 +35,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostics/source-printing-effects.h"
 #include "pretty-print-markup.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "diagnostics/selftest-paths.h"
 #include "text-art/theme.h"
 #include "diagnostics/text-sink.h"
diff --git a/gcc/diagnostics/sarif-sink.cc b/gcc/diagnostics/sarif-sink.cc
index 228917286bec..2fafb4127cf2 100644
--- a/gcc/diagnostics/sarif-sink.cc
+++ b/gcc/diagnostics/sarif-sink.cc
@@ -44,7 +44,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "ordered-hash-map.h"
 #include "sbitmap.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "diagnostics/selftest-source-printing.h"
 #include "selftest-json.h"
 #include "text-range-label.h"
diff --git a/gcc/selftest-diagnostic.cc b/gcc/diagnostics/selftest-context.cc
similarity index 98%
rename from gcc/selftest-diagnostic.cc
rename to gcc/diagnostics/selftest-context.cc
index 321949852384..918bd5e430b1 100644
--- a/gcc/selftest-diagnostic.cc
+++ b/gcc/diagnostics/selftest-context.cc
@@ -23,7 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "diagnostic.h"
 #include "diagnostics/sink.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 
 /* The selftest code should entirely disappear in a production
    configuration, hence we guard all of it with #if CHECKING_P.  */
diff --git a/gcc/selftest-diagnostic.h b/gcc/diagnostics/selftest-context.h
similarity index 93%
rename from gcc/selftest-diagnostic.h
rename to gcc/diagnostics/selftest-context.h
index 6a5216650f92..afbc6611ed77 100644
--- a/gcc/selftest-diagnostic.h
+++ b/gcc/diagnostics/selftest-context.h
@@ -17,8 +17,8 @@ You should have received a copy of the GNU General Public 
License
 along with GCC; see the file COPYING3.  If not see
 <http://www.gnu.org/licenses/>.  */
 
-#ifndef GCC_SELFTEST_DIAGNOSTIC_H
-#define GCC_SELFTEST_DIAGNOSTIC_H
+#ifndef GCC_DIAGNOSTICS_SELFTEST_CONTEXT_H
+#define GCC_DIAGNOSTICS_SELFTEST_CONTEXT_H
 
 /* The selftest code should entirely disappear in a production
    configuration, hence we guard all of it with #if CHECKING_P.  */
@@ -60,4 +60,4 @@ class test_diagnostic_context : public diagnostics::context
 
 #endif /* #if CHECKING_P */
 
-#endif /* GCC_SELFTEST_DIAGNOSTIC_H */
+#endif /* GCC_DIAGNOSTICS_SELFTEST_CONTEXT_H */
diff --git a/gcc/diagnostics/source-printing.cc 
b/gcc/diagnostics/source-printing.cc
index 7794dc2c6715..abb6bb7115b8 100644
--- a/gcc/diagnostics/source-printing.cc
+++ b/gcc/diagnostics/source-printing.cc
@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "gcc-rich-location.h"
 #include "text-range-label.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 #include "diagnostics/selftest-source-printing.h"
 #include "cpplib.h"
 #include "text-art/types.h"
diff --git a/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.cc 
b/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.cc
index 8abed140ac9c..c6fe3016f896 100644
--- a/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.cc
+++ b/gcc/testsuite/gcc.dg/plugin/expensive_selftests_plugin.cc
@@ -8,7 +8,7 @@
 #include "diagnostic.h"
 #include "diagnostics/edit-context.h"
 #include "selftest.h"
-#include "selftest-diagnostic.h"
+#include "diagnostics/selftest-context.h"
 
 int plugin_is_GPL_compatible;

Reply via email to