Move selftest::test_diagnostic_context to its own header
commitdb7ff53df7a0d261cc915070924769cdc7f4d580
authordmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Nov 2017 20:09:18 +0000 (2 20:09 +0000)
committerdmalcolm <dmalcolm@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Nov 2017 20:09:18 +0000 (2 20:09 +0000)
treeb67059978ac4433c1dd625a2b91b9cc71871a9f5
parent69121b015ed7fd5798849a1d01f6d65196297b5e
Move selftest::test_diagnostic_context to its own header

It's useful to not rely on global_dc in selftests, so this patch
moves class selftest::test_diagnostic_context from
diagnostic-show-locus.c to a new header and source file.

gcc/ChangeLog:
* Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
* diagnostic-show-locus.c: Include "selftest-diagnostic.h".
(class selftest::test_diagnostic_context): Move to...
* selftest-diagnostic.c: New file.
* selftest-diagnostic.h: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254354 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/Makefile.in
gcc/diagnostic-show-locus.c
gcc/selftest-diagnostic.c [new file with mode: 0644]
gcc/selftest-diagnostic.h [new file with mode: 0644]