diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-01-31 23:01:15 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-02-14 12:14:52 +1100 |
commit | 8caf67eea7e1b29a4437f07d13c300d9fdb04827 (patch) | |
tree | 9b2124aafa685d02520cce8bce6b5243b1fc2f58 /gcc/tree-vect-loop.cc | |
parent | 12feb78be517472ca941953dce47d6e78e5a17f8 (diff) | |
download | gcc-8caf67eea7e1b29a4437f07d13c300d9fdb04827.zip gcc-8caf67eea7e1b29a4437f07d13c300d9fdb04827.tar.gz gcc-8caf67eea7e1b29a4437f07d13c300d9fdb04827.tar.bz2 |
c++: Clear lambda scope for unattached member template lambdas
In r15-7202 we made lambdas between a template parameter scope and a
class/function/initializer be considered TU-local, in lieu of working
out how to mangle them to the succeeding declaration.
I neglected to clear any existing mangling on the template declaration
however; this means that such lambdas can occasionally get a lambda
scope, and will in general inherit the lambda scope of their
instantiation context (whatever that might be).
This patch ensures that the scope is cleared on the template declaration
as well.
gcc/cp/ChangeLog:
* lambda.cc (record_lambda_scope): Clear mangling scope for
otherwise unattached lambdas in class member templates.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/lambda-uneval22.C: Add check that the primary
specialisation of the lambda is TU-local.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/tree-vect-loop.cc')
0 files changed, 0 insertions, 0 deletions