aboutsummaryrefslogtreecommitdiff
path: root/libcpp/lex.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2020-11-03 08:45:15 -0800
committerNathan Sidwell <nathan@acm.org>2020-11-03 08:49:27 -0800
commitcee45e49126d18fe2dc8efc83c190662cd41914d (patch)
tree055b8c78ad9ddd204792b60acb51dbfabc52a6a9 /libcpp/lex.c
parent1c8b8efa5becb70e04216a60021b835387ffea4e (diff)
downloadgcc-cee45e49126d18fe2dc8efc83c190662cd41914d.zip
gcc-cee45e49126d18fe2dc8efc83c190662cd41914d.tar.gz
gcc-cee45e49126d18fe2dc8efc83c190662cd41914d.tar.bz2
c++: Directly fixup deferred eh-specs
eh-specifiers in a class definition are complete-definition contexts, and we sometimes need to deferr their parsing. We create a deferred eh specifier, which can end up persisting in the type system due to variants being created before the deferred parse. This causes problems in modules handling. This patch adds fixup_deferred_exception_variants, which directly modifies the variants of such an eh spec once parsed. As commented, the general case is quite hard, so it doesn't deal with everything. But I do catch the cases I encountered (from the std library). gcc/cp/ * cp-tree.h (fixup_deferred_exception_variants): Declare. * parser.c (cp_parser_class_specifier_1): Call it when completing deferred parses rather than creating a variant. (cp_parser_member_declaration): Move comment from ... (cp_parser_noexcept_specification_opt): ... here. Refactor the deferred parse. * tree.c (fixup_deferred_exception_variants): New.
Diffstat (limited to 'libcpp/lex.c')
0 files changed, 0 insertions, 0 deletions