c++: Various small fixes
commit9c6344c10de1c90015c68adfb880291af980b886
authorJason Merrill <jason@redhat.com>
Wed, 25 Aug 2021 19:10:21 +0000 (25 15:10 -0400)
committerJason Merrill <jason@redhat.com>
Tue, 31 Aug 2021 19:54:25 +0000 (31 15:54 -0400)
treee41045d74d9b32a9b9b9ec0ceaf53e025a79f157
parente4cb3bb9ac11b4126ffa718287dd509a4b10a658
c++: Various small fixes

A copy-paste error, a couple of missed checks to guard undefined accesses,
and we don't need to use type_uses_auto to extract the auto node we just
built.

gcc/cp/ChangeLog:

* coroutines.cc (flatten_await_stmt): Fix copyo.
* decl.c (reshape_init_class): Simplify.
* module.cc (module_state::read_language): Add null check.
* parser.c (build_range_temp): Avoid type_uses_auto.
(cp_parser_class_specifier_1): Add null check.
gcc/cp/coroutines.cc
gcc/cp/decl.c
gcc/cp/module.cc
gcc/cp/parser.c