Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-26 Thread Jason Merrill
On Thu, Apr 26, 2018 at 3:45 AM, Richard Biener wrote: > On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote: >> On 04/25/2018 11:41 AM, David Malcolm wrote: >>> >>> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows >>> two

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-26 Thread Richard Biener
On Wed, Apr 25, 2018 at 7:10 PM, Nathan Sidwell wrote: > On 04/25/2018 11:41 AM, David Malcolm wrote: >> >> Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows >> two issues where g++ offers suggestions about implementation details: > > >> For the lambda

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-25 Thread Nathan Sidwell
On 04/25/2018 11:41 AM, David Malcolm wrote: Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows two issues where g++ offers suggestions about implementation details: For the lambda capture case, there are multiple members: $9 = These names have a space at the end,

Re: [PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-25 Thread Jakub Jelinek
On Wed, Apr 25, 2018 at 11:41:51AM -0400, David Malcolm wrote: > @@ -1224,9 +1225,19 @@ lookup_field_fuzzy_info::fuzzy_lookup_field (tree type) > >for (tree field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field)) > { > - if (!m_want_type_p || DECL_DECLARES_TYPE_P (field)) >

[PATCH] Don't offer suggestions for compiler-generated variables (PR c++/85515)

2018-04-25 Thread David Malcolm
Jason Turner's video C++ Weekly - Ep 112 - GCC's Leaky Abstractions shows two issues where g++ offers suggestions about implementation details: Example 1: int main () { auto lambda = [val = 2](){}; lambda.val; } : In function 'int main()': :5:10: error: 'struct main()::' has no