mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
f714ecf522
commit
54d04ce91a
|
|
@ -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>
|
2018-12-15 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
PR c++/84644
|
PR c++/84644
|
||||||
|
|
|
||||||
|
|
@ -16911,8 +16911,9 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
|
||||||
tree inst;
|
tree inst;
|
||||||
if (!DECL_PACK_P (decl))
|
if (!DECL_PACK_P (decl))
|
||||||
{
|
{
|
||||||
inst = lookup_name_real (DECL_NAME (decl), 0, 0,
|
inst = lookup_name_real (DECL_NAME (decl), /*prefer_type*/0,
|
||||||
/*block_p=*/true, 0, LOOKUP_HIDDEN);
|
/*nonclass*/1, /*block_p=*/true,
|
||||||
|
/*ns_only*/0, LOOKUP_HIDDEN);
|
||||||
gcc_assert (inst != decl && is_capture_proxy (inst));
|
gcc_assert (inst != decl && is_capture_proxy (inst));
|
||||||
}
|
}
|
||||||
else if (is_normal_capture_proxy (decl))
|
else if (is_normal_capture_proxy (decl))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue