diff options
author | Nathan Sidwell <nathan@acm.org> | 2021-02-10 05:29:39 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2021-02-10 05:34:42 -0800 |
commit | f8fac476b5ce4b9a37ea2b257d9da810f8c507be (patch) | |
tree | c61987740ec5c1df419f50268d687c2c500b0abc /gcc/varasm.c | |
parent | 57d1b68d6582efec5a7ca63ea56a1cedbfe6e874 (diff) | |
download | gcc-f8fac476b5ce4b9a37ea2b257d9da810f8c507be.zip gcc-f8fac476b5ce4b9a37ea2b257d9da810f8c507be.tar.gz gcc-f8fac476b5ce4b9a37ea2b257d9da810f8c507be.tar.bz2 |
c++: generic lambdas and local-externs from outer scopes [PR 99030]
Lambdas can refer to local externs from their enclosing scope. When
the lambda's generic but the containing function is not a temploid,
we'll never have tsubsted the declaring decl so won't have a local
specialization. But in that case we can just use the decl we
tsubsting directly -- it's not dependent.
PR c++/99030
gcc/cp
* pt.c (tsubst_copy) [VAR_DECL]: For a DECL_LOCAL_DECL_P T is the
answer if there's no local specialization.
gcc/testsuite/
* g++.dg/lookup/pr99030.C: New.
Diffstat (limited to 'gcc/varasm.c')
0 files changed, 0 insertions, 0 deletions