diff options
author | Jason Merrill <jason@redhat.com> | 2018-12-15 17:10:18 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2018-12-15 17:10:18 -0500 |
commit | 54d04ce91ae8e6a2d647200f9443556e6fadc9e2 (patch) | |
tree | 6ea880a1eb31c5cbfb7eea13dac3082a4fe1737d | |
parent | f714ecf522782f76d7d9d9826fe1bcd23259cf24 (diff) | |
download | gcc-54d04ce91ae8e6a2d647200f9443556e6fadc9e2.zip gcc-54d04ce91ae8e6a2d647200f9443556e6fadc9e2.tar.gz gcc-54d04ce91ae8e6a2d647200f9443556e6fadc9e2.tar.bz2 |
Small lambda instantiation tweak.
While looking at something else I noticed that we were passing 0 to the
"nonclass" parameter here; we might as well pass 1, since capture proxies
are always at block scope.
* pt.c (tsubst_expr) [DECL_EXPR]: Ignore class-scope bindings when
looking up a capture proxy.
From-SVN: r267176
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ee9e570..9b8dae3 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2018-12-14 Jason Merrill <jason@redhat.com> + + * pt.c (tsubst_expr) [DECL_EXPR]: Ignore class-scope bindings when + looking up a capture proxy. + 2018-12-15 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84644 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 20f0d16..79eef12 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -16911,8 +16911,9 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, tree inst; if (!DECL_PACK_P (decl)) { - inst = lookup_name_real (DECL_NAME (decl), 0, 0, - /*block_p=*/true, 0, LOOKUP_HIDDEN); + inst = lookup_name_real (DECL_NAME (decl), /*prefer_type*/0, + /*nonclass*/1, /*block_p=*/true, + /*ns_only*/0, LOOKUP_HIDDEN); gcc_assert (inst != decl && is_capture_proxy (inst)); } else if (is_normal_capture_proxy (decl)) |