aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
authorNathaniel Shead <nathanieloshead@gmail.com>2023-11-13 20:11:15 +1100
committerNathaniel Shead <nathanieloshead@gmail.com>2023-11-24 13:31:11 +1100
commitcff1fa6625d1273fcfaf473e436ba918262d8afa (patch)
treead684b104ddd587a4ffb66c3ce824ac5f9612985 /gcc/tree.cc
parenta1f8e65dee2d9e929cd083f36501d08bdc9c8072 (diff)
downloadgcc-cff1fa6625d1273fcfaf473e436ba918262d8afa.zip
gcc-cff1fa6625d1273fcfaf473e436ba918262d8afa.tar.gz
gcc-cff1fa6625d1273fcfaf473e436ba918262d8afa.tar.bz2
c++: Support lambdas in static template member initialisers [PR107398]
The testcase noted in the PR fails because the context of the lambda is not in namespace scope, but rather in class scope. This patch removes the assertion that the context must be a namespace and ensures that lambdas in class scope still get the correct merge_kind. PR c++/107398 gcc/cp/ChangeLog: * module.cc (trees_out::get_merge_kind): Handle lambdas in class scope. (maybe_key_decl): Remove assertion and fix whitespace. gcc/testsuite/ChangeLog: * g++.dg/modules/lambda-6_a.C: New test. * g++.dg/modules/lambda-6_b.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions