aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2016-05-02 19:09:30 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2016-05-02 19:09:30 +0000
commitbc1aee87f6494a59eea3ffbbb0577ccd85cdc4a1 (patch)
tree026c49c2d8eadd08c56f75e225d4cb516a351820 /gcc/gimple.c
parent7caed520694ee532199e889eba09a900ecce1866 (diff)
downloadgcc-bc1aee87f6494a59eea3ffbbb0577ccd85cdc4a1.zip
gcc-bc1aee87f6494a59eea3ffbbb0577ccd85cdc4a1.tar.gz
gcc-bc1aee87f6494a59eea3ffbbb0577ccd85cdc4a1.tar.bz2
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
Diffstat (limited to 'gcc/gimple.c')
0 files changed, 0 insertions, 0 deletions