]> gcc.gnu.org Git - gcc.git/commit
c++: more dummy non_constant_p arg avoidance
authorPatrick Palka <ppalka@redhat.com>
Tue, 5 Sep 2023 14:20:51 +0000 (10:20 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 5 Sep 2023 14:20:51 +0000 (10:20 -0400)
commit9922bfa59c6bd881c997cf9a0d070fd62f2940c9
treeb4699826a100fcc00e9779b11affc0d3bc22246e
parentad82d19d6a66d7b28e9e181d6d55404802a77784
c++: more dummy non_constant_p arg avoidance

As a follow-up to Marek's r14-3088-ga263152643bbec, this patch makes
us avoid passing an effectively dummy non_constant_p argument in two
more spots in the parser so that we further avoid unnecessary
constantness checks from cp_parser_constant_expression.

gcc/cp/ChangeLog:

* parser.cc (cp_parser_parenthesized_expression_list_elt): Pass
nullptr as non_constant_p to cp_parser_braced_list if our
non_constant_p is null.
(cp_parser_initializer_list): Likewise to
cp_parser_initializer_clause.  Avoid inspecting
clause_non_constant_p if it's uninitialized.
gcc/cp/parser.cc
This page took 0.066975 seconds and 6 git commands to generate.