Don't offer suggestions for compiler-generated variables (PR c++/85515)
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 27 Apr 2018 18:39:18 +0000 (18:39 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 27 Apr 2018 18:39:18 +0000 (18:39 +0000)
commit66bd30863fe5673f902fa64a1af0a47f4911fdd2
tree9d4bfe51102d1732770424d8fbdd728fd7a1b380
parent2885a4939a7c96441210d6b3507524b6970d1013
Don't offer suggestions for compiler-generated variables (PR c++/85515)

gcc/cp/ChangeLog:
PR c++/85515
* name-lookup.c (consider_binding_level): Skip compiler-generated
variables.
* search.c (lookup_field_fuzzy_info::fuzzy_lookup_field): Flatten
nested if statements into a series of rejection tests.  Reject
lambda-ignored entities as suggestions.

gcc/testsuite/ChangeLog:
PR c++/85515
* g++.dg/pr85515-1.C: New test.
* g++.dg/pr85515-2.C: New test.

From-SVN: r259720
gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/cp/search.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr85515-1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/pr85515-2.C [new file with mode: 0644]