aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2024-11-25 23:29:25 -0500
committerJason Merrill <jason@redhat.com>2025-01-09 21:43:11 -0500
commit6fe395025deda274f2f92b04e3e329aa53771dfe (patch)
treec11d89473d4510c3ccd88cead00a19a21ab8fdd3 /gcc/c/c-parser.cc
parente8a57884ad4898fdec5c13a8933d73bcbaf06099 (diff)
downloadgcc-6fe395025deda274f2f92b04e3e329aa53771dfe.zip
gcc-6fe395025deda274f2f92b04e3e329aa53771dfe.tar.gz
gcc-6fe395025deda274f2f92b04e3e329aa53771dfe.tar.bz2
c++: modules, generic lambda, constexpr if
In std/ranges/concat/1.cc we end up instantiating concat_view::iterator::operator-, which has nested generic lambdas, where the innermost is all constexpr if. tsubst_lambda_expr propagates the returns_* flags for generic lambdas since we might not substitute into the whole function, as in this case with constexpr if. But the module wasn't preserving that flag, and so the importer gave a bogus "no return statement" diagnostic. gcc/cp/ChangeLog: * module.cc (trees_out::write_function_def): Write returns* flags. (struct post_process_data): Add returns_* flags. (trees_in::read_function_def): Set them. (module_state::read_cluster): Use them. gcc/testsuite/ChangeLog: * g++.dg/modules/constexpr-if-1_a.C: New test. * g++.dg/modules/constexpr-if-1_b.C: New test.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions