Go to file
David Malcolm 1a3a7b4eeb Add gcc_rich_location::add_fixit_insert_formatted
This patch adds a support function to class gcc_rich_location
to make it easier for fix-it hints to use idiomatic C/C++
indentation, for use by the patch for PR c++/85523.

gcc/ChangeLog:
	PR c++/85523
	* gcc-rich-location.c (blank_line_before_p): New function.
	(use_new_line): New function.
	(gcc_rich_location::add_fixit_insert_formatted): New function.
	* gcc-rich-location.h
	(gcc_rich_location::add_fixit_insert_formatted): New function.

gcc/testsuite/ChangeLog:
	PR c++/85523
	* gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c
	(test_add_fixit_insert_formatted_single_line): New function.
	(test_add_fixit_insert_formatted_multiline): New function.
	Extend expected output of generated patch to include fix-it hints
	for these.
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c: Include
	"gcc-rich-location.h".  Add test coverage for
	gcc_rich_location::add_fixit_insert_formatted.

From-SVN: r259783
2018-05-01 00:10:10 +00:00
config x86/CET: Add -fcf-protection to STAGE4_CFLAGS 2018-04-24 15:12:46 -07:00
contrib
fixincludes
gcc Add gcc_rich_location::add_fixit_insert_formatted 2018-05-01 00:10:10 +00:00
gnattools
gotools
include
INSTALL
intl
libada
libatomic Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libbacktrace Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libcc1 PR c++/69560 - wrong alignof(double) on x86. 2018-04-23 16:49:38 -04:00
libcpp
libdecnumber
libffi
libgcc re PR libgcc/84292 (__sync_add_and_fetch returns the old value instead of the new value) 2018-04-27 21:14:05 +02:00
libgfortran Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libgo re PR go/85429 (Several gotools tests FAIL with Solaris as) 2018-04-27 18:01:00 +00:00
libgomp [openacc, testsuite] Fix undefined behaviour in atomic_capture-1.c 2018-04-29 10:26:56 +00:00
libhsail-rt
libiberty argv.c (expandargv): Fix memory leak for expanded arguments. 2018-04-30 12:00:49 -06:00
libitm x86: Update __CET__ check 2018-04-24 15:15:51 -07:00
libmpx Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libobjc Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
liboffloadmic
libquadmath Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libsanitizer If someone has access to a 64-bit mips-linux system to test this (with the obvious edit), that'd be really nice. 2018-04-26 01:16:47 +00:00
libssp Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libstdc++-v3 Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
libvtv Regenerate configure of target libraries 2018-04-24 09:45:26 -07:00
lto-plugin
maintainer-scripts * crontab: Enable snapshots from gcc-8-branch. 2018-04-25 09:46:31 +02:00
zlib
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
ChangeLog re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-04-30 08:18:03 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess
config.rpath
config.sub
configure
configure.ac
COPYING
COPYING3
COPYING3.LIB
COPYING.LIB
COPYING.RUNTIME
depcomp
install-sh
libtool-ldflags
libtool.m4
lt~obsolete.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
MAINTAINERS MAINTAINERS (mips): Remove myself as MIPS maintainer. 2018-04-25 18:40:04 -04:00
Makefile.def
Makefile.in re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-04-30 08:18:03 +00:00
Makefile.tpl re PR bootstrap/85571 (non-bootstrap-debug miscompare with trunk) 2018-04-30 08:18:03 +00:00
missing
mkdep
mkinstalldirs
move-if-change
README
symlink-tree
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.