coroutines: Handle namespaces while scanning local vars [PR95711].
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 28 Jun 2020 11:29:11 +0000 (12:29 +0100)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 28 Jun 2020 12:52:25 +0000 (13:52 +0100)
commit06ed4aae1c2fa84b7050a286d866db4a6def3c36
treeb0bd54a66653be4d04b3733d3d2060395930f197
parentf3a8f66a83f8c94f6fbb0233cefba8032f2e4876
coroutines: Handle namespaces while scanning local vars [PR95711].

We need to skip past namespace decls when scanning the bind
expression var lists checking for local vars.

gcc/cp/ChangeLog:

PR c++/95711
* coroutines.cc (register_local_var_uses): Skip past
namespace decls.

gcc/testsuite/ChangeLog:

PR c++/95711
* g++.dg/coroutines/pr95711.C: New test.
gcc/cp/coroutines.cc
gcc/testsuite/g++.dg/coroutines/pr95711.C [new file with mode: 0644]