Go to file
David Malcolm bc1aee87f6 PR c++/62314: C++: add fixit hint to misspelled member names
When we emit a hint about a misspelled member name, it will slightly
aid readability if we use a fixit-hint to show the proposed
name in context within the source code (and in the future this
might support some kind of auto-apply in an IDE).

This patch adds such a hint to the C++ frontend, taking us from:

test.cc:10:15: error: 'struct foo' has no member named 'colour'; did you mean 'color'?
   return ptr->colour;
               ^~~~~~

to:

test.cc:10:15: error: 'struct foo' has no member named 'colour'; did you mean 'color'?
   return ptr->colour;
               ^~~~~~
               color

gcc/cp/ChangeLog:
	PR c++/62314
	* typeck.c (finish_class_member_access_expr): When
	giving a hint about a possibly-misspelled member name,
	add a fix-it replacement hint.

gcc/testsuite/ChangeLog:
	PR c++/62314
	* g++.dg/spellcheck-fields-2.C: New test case.

From-SVN: r235785
2016-05-02 19:09:30 +00:00
boehm-gc [Hurd, kFreeBSD] boehm-gc: Use mmap instead of brk 2016-03-29 23:05:07 +02:00
config config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
contrib configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
fixincludes
gcc PR c++/62314: C++: add fixit hint to misspelled member names 2016-05-02 19:09:30 +00:00
gnattools gnattools: Clean config.cache (PR70173) 2016-04-04 18:37:58 +02:00
gotools
include Add DW_LANG_Rust 2016-04-29 15:01:30 +00:00
INSTALL
intl
libada config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
libatomic [libatomic] Add RTEMS support 2016-04-27 07:14:42 +00:00
libbacktrace
libcc1 tree.h (TYPE_ALIGN, DECL_ALIGN): Return shifted amount. 2016-04-18 20:36:27 +00:00
libcilkrts Compile libcilkrts with -funwind-tables (PR target/60290) 2016-04-26 08:55:02 +00:00
libcpp * sv.po: Update. 2016-04-30 15:11:52 +01:00
libdecnumber
libffi Summary: libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32 2016-03-17 10:47:58 +00:00
libgcc config.guess: Remove SH5 support. 2016-04-30 09:11:03 +00:00
libgfortran re PR libfortran/70684 (incorrect reading of values from file on Windows) 2016-04-19 19:24:28 +00:00
libgo cmd/go: bring in final version of gccgo pkg-config support 2016-04-23 00:41:03 +00:00
libgomp omp-low.c (struct oacc_loop): Add 'inner' field. 2016-05-02 13:16:22 +00:00
libiberty Demangler integer overflow fixes from Marcel Böhme. 2016-05-02 17:06:40 +00:00
libitm Allocate memory on cache line if requested 2016-04-19 10:01:11 -07:00
libjava config.guess: Revert r235676. 2016-04-30 10:26:14 +00:00
libmpx
libobjc
liboffloadmic
libquadmath
libsanitizer Cherry-pick r266868 from upstream. 2016-04-21 15:19:54 +03:00
libssp
libstdc++-v3 Remove trailing whitespace from libstdc++-v3 files 2016-04-29 17:11:43 +01:00
libvtv Don't install libvtv without --enable-vtable-verify 2016-05-02 18:10:17 +00:00
lto-plugin
maintainer-scripts * crontab: Enable snapshots from gcc-6-branch. 2016-04-15 17:33:15 +02:00
zlib
.dir-locals.el
.gitattributes add basic .gitattributes files to notice whitespace issues 2016-04-23 02:37:43 +00:00
.gitignore
ABOUT-NLS
ChangeLog configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in
config.guess config.guess: Revert r235676. 2016-04-30 10:26:14 +00:00
config.rpath
config.sub config.guess: Revert r235676. 2016-04-30 10:26:14 +00:00
configure configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
configure.ac configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
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 Add myself as maintainer for the PowerPC port 2016-04-22 23:18:49 +02:00
Makefile.def configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
Makefile.in configure.ac (mpfr): Remove pre-3.1.0 mpfr compatibility code. 2016-05-02 15:23:20 +00:00
Makefile.tpl Make distclean clean up more (PR70173) 2016-04-13 20:02:08 +02: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.