]> gcc.gnu.org Git - gcc.git/commit
c++: Don't suggest cdtor or conversion op identifiers in spelling hints [PR104806]
authorJakub Jelinek <jakub@redhat.com>
Tue, 8 Mar 2022 20:41:21 +0000 (21:41 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 10 May 2022 08:14:34 +0000 (10:14 +0200)
commitda83eb387b2e0e4dfab73b735beac87ed269c866
tree9f44211c2db7224c02c6ce97e6acbaf995a2ee45
parent2183785c198ef17138985509cedf5051b3d58452
c++: Don't suggest cdtor or conversion op identifiers in spelling hints [PR104806]

On the following testcase, we emit "did you mean '__dt '?" in the error
message.  "__dt " shows there because it is dtor_identifier, but we
shouldn't suggest those to the user, they are purely internal and can't
be really typed by the user because of the final space in it.

2022-03-08  Jakub Jelinek  <jakub@redhat.com>

PR c++/104806
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Ignore
identifiers with space at the end.

* g++.dg/spellcheck-pr104806.C: New test.

(cherry picked from commit e480c3c06d20874fd7504bfdcca0b829f8000389)
gcc/cp/search.c
gcc/testsuite/g++.dg/spellcheck-pr104806.C [new file with mode: 0644]
This page took 0.063104 seconds and 6 git commands to generate.