Skip to content

Commit 01aeb25

Browse files
Merge pull request gcc-mirror#96 from NinaRanns/skip_to_closing_parens_fix
fixing the erroneous use of cp_parser_skip_to_closing_parenthesis_1
2 parents 4c19686 + 709db10 commit 01aeb25

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

gcc/cp/parser.cc

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31841,9 +31841,10 @@ cp_parser_function_contract_specifier (cp_parser *parser)
3184131841

3184231842
if (identifier == error_mark_node)
3184331843
{
31844-
cp_parser_skip_to_closing_parenthesis_1 (parser, /*recovering=*/true,
31845-
CPP_CLOSE_PAREN,
31846-
/*consume_paren=*/true);
31844+
cp_parser_skip_to_closing_parenthesis (parser,
31845+
/*recovering=*/true,
31846+
/*or_comma=*/false,
31847+
/*consume_paren=*/true);
3184731848
return error_mark_node;
3184831849
}
3184931850

@@ -31861,9 +31862,9 @@ cp_parser_function_contract_specifier (cp_parser *parser)
3186131862
cp_token *first = cp_lexer_peek_token (parser->lexer);
3186231863

3186331864
/* Skip until we reach a closing token ). */
31864-
cp_parser_skip_to_closing_parenthesis_1 (parser,
31865+
cp_parser_skip_to_closing_parenthesis (parser,
3186531866
/*recovering=*/false,
31866-
CPP_CLOSE_PAREN,
31867+
/*or_comma=*/false,
3186731868
/*consume_paren=*/false);
3186831869

3186931870
cp_token *last = cp_lexer_peek_token (parser->lexer);

0 commit comments

Comments
 (0)