Go to file
David Malcolm b09649fdc6 Add support for mutually-incompatible fix-it hints
This patch adds a method:
  rich_location::fixits_cannot_be_auto_applied
for ensuring that mutually-incompatible fix-its hints don't
lead to insane output from -fdiagnostics-generate-patch.

Fix-it hints within such rich_location instances are printed
as normal by diagnostic_show_locus, but don't affect the output
of -fdiagnostics-generate-patch.

gcc/ChangeLog:
	* diagnostic.c (diagnostic_report_diagnostic): Only add fixits
	to the edit_context if they can be auto-applied.

gcc/testsuite/ChangeLog:
	* gcc.dg/plugin/diagnostic-test-show-locus-bw.c
	(test_mutually_exclusive_suggestions): New test function.
	* gcc.dg/plugin/diagnostic-test-show-locus-generate-patch.c
	(test_mutually_exclusive_suggestions): New test function.
	* gcc.dg/plugin/diagnostic-test-show-locus-parseable-fixits.c
	(test_mutually_exclusive_suggestions): New test function.
	* gcc.dg/plugin/diagnostic_plugin_test_show_locus.c
	(test_show_locus): Add special-case for
	"test_mutually_exclusive_suggestions".

libcpp/ChangeLog:
	* include/line-map.h
	(rich_location::fixits_cannot_be_auto_applied): New method.
	(rich_location::fixits_can_be_auto_applied_p): New accessor.
	(rich_location::m_fixits_cannot_be_auto_applied): New field.
	* line-map.c (rich_location::rich_location): Initialize new field.

From-SVN: r249081
2017-06-09 20:57:38 +00:00
INSTALL
config configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
contrib Doxygen: transform ENUM_BITFIELD and comments starting with '/**'. 2017-05-31 14:08:36 +00:00
fixincludes re PR target/68739 (FAIL: 30_threads/call_once/constexpr.cc (test for excess errors)) 2017-02-25 20:29:39 +00:00
gcc Add support for mutually-incompatible fix-it hints 2017-06-09 20:57:38 +00:00
gnattools
gotools re PR go/80814 (commit aa443150c83535fedccb3dee80daa7e01fafd92d causes a build error.) 2017-05-18 22:44:12 +00:00
include * libiberty.h (ASTRDUP): Adjust cast to avoid warning. 2017-05-25 00:33:48 +00:00
intl
libada re PR ada/80921 (cross compiling fails to build Ada shared libraries) 2017-06-01 10:51:15 +00:00
libatomic Load new scanlang.exp 2017-05-12 09:20:37 +00:00
libbacktrace dwarf.c (free_line_header): Don't free dirs if dirs_count == 0. 2017-05-19 16:07:24 +00:00
libcc1 Inline and using namespace representation change. 2017-05-26 17:19:46 +00:00
libcilkrts
libcpp Add support for mutually-incompatible fix-it hints 2017-06-09 20:57:38 +00:00
libdecnumber Fix numerous typos in comments 2017-04-03 23:30:56 +01:00
libffi
libgcc Speed-up indirect-call instrumentation 2017-06-09 12:54:53 +00:00
libgfortran re PR fortran/80975 (matmul for zero-length arrays) 2017-06-06 19:18:37 +00:00
libgo libgo: update to 1.8.3 release 2017-06-08 19:02:12 +00:00
libgomp invoke.texi: Document the -Wsizeof-pointer-div warning. 2017-06-02 04:06:59 +00:00
libhsail-rt Minor BRIG/HSAIL frontend updates and bug fixes: 2017-05-04 05:50:21 +00:00
libiberty simple-object-xcoff.c (simple_object_xcoff_find_sections): Search symbol table for .go_export symbol and apply pfn if found. 2017-06-07 19:23:55 -04:00
libitm Load new scanlang.exp 2017-05-12 09:20:37 +00:00
libmpx
libobjc
liboffloadmic
libquadmath configure.ac (ACX_BUGURL): Update. 2017-02-09 10:56:08 +00:00
libsanitizer Cherry-pick upstream r299036 from libsanitizer (PR sanitizer/80166). 2017-04-06 13:42:24 +00:00
libssp ssp.c (__guard_setup): Suppress unused variable warning. 2017-04-02 00:35:58 +00:00
libstdc++-v3 Support move-only deleters in std::shared_ptr (LWG 2802) 2017-06-09 14:20:37 +01:00
libvtv
lto-plugin
maintainer-scripts gcc_release (XZ): Default to xz --best. 2017-05-23 23:14:10 +00:00
zlib re PR bootstrap/79771 (in-tree zlib breaks build) 2017-03-14 23:01:23 -06:00
.dir-locals.el
.gitattributes
.gitignore
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Add self to Write After Approval 2017-05-31 08:25:25 +00:00
Makefile.def re PR bootstrap/77661 (--enable-maintainer-mode causes in-tree-build of MPC to fail) 2017-04-19 18:49:29 +00:00
Makefile.in re PR bootstrap/77661 (--enable-maintainer-mode causes in-tree-build of MPC to fail) 2017-04-19 18:49:29 +00:00
Makefile.tpl Restore Graphite fuse-*.c testing 2017-02-15 15:43:42 +01:00
README
compile
config-ml.in
config.guess * config.guess: Import latest from upstream. 2017-03-18 18:22:06 +00:00
config.rpath
config.sub
configure configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
configure.ac configure.ac (*-*-linux-android*): Set target_makefile_frag. 2017-06-03 08:23:22 +00:00
depcomp
install-sh
libtool-ldflags
libtool.m4
ltgcc.m4
ltmain.sh
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
symlink-tree
ylwrap

README

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.