Add -fdiagnostics-path-format=separate-events to -fdiagnostics-plain-output
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 6 Oct 2020 20:58:00 +0000 (16:58 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 7 Oct 2020 13:37:11 +0000 (09:37 -0400)
commit7345c89ecb1a31ce96c6789bffc7183268a040b3
tree6c67bc927dfe4ce2b2dcc7ef73045744d6956e3d
parent4e62aca0e0520e4ed2532f2d8153581190621c1a
Add -fdiagnostics-path-format=separate-events to -fdiagnostics-plain-output

The path-printing default of -fdiagnostics-path-format=inline-events
interacted poorly with -fdiagnostics-plain-output, so it makes most
sense to add -fdiagnostics-path-format=separate-events to
-fdiagnostics-plain-output.

Seen when adding an experimental analyzer plugin to gcc.dg/plugin.exp.

gcc/ChangeLog:
* doc/invoke.texi (-fdiagnostics-plain-output): Add
-fdiagnostics-path-format=separate-events to list of
options injected by -fdiagnostics-plain-output.
* opts-common.c (decode_cmdline_options_to_array): Likewise.

gcc/testsuite/ChangeLog:
* g++.dg/analyzer/analyzer.exp (DEFAULT_CXXFLAGS): Remove
-fdiagnostics-path-format=separate-events.
* gcc.dg/analyzer/analyzer.exp (DEFAULT_CFLAGS): Likewise.
* gcc.dg/plugin/diagnostic-path-format-default.c: Rename to...
* gcc.dg/plugin/diagnostic-path-format-plain.c: ...this.  Remove
dg-options directive.  Copy remainder of test from
diagnostic-path-format-separate-events.c.
* gcc.dg/plugin/diagnostic-test-paths-2.c: Add
-fdiagnostics-path-format=inline-events to options.
Fix expected output for location of conditional within "for" loop.
* gcc.dg/plugin/plugin.exp (plugin_test_list): Update for
renaming.
* gfortran.dg/analyzer/analyzer.exp (DEFAULT_FFLAGS): Remove
-fdiagnostics-path-format=separate-events.
gcc/doc/invoke.texi
gcc/opts-common.c
gcc/testsuite/g++.dg/analyzer/analyzer.exp
gcc/testsuite/gcc.dg/analyzer/analyzer.exp
gcc/testsuite/gcc.dg/plugin/diagnostic-path-format-default.c [deleted file]
gcc/testsuite/gcc.dg/plugin/diagnostic-path-format-plain.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/plugin/diagnostic-test-paths-2.c
gcc/testsuite/gcc.dg/plugin/plugin.exp
gcc/testsuite/gfortran.dg/analyzer/analyzer.exp