aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-infer.cc
diff options
context:
space:
mode:
authorLewis Hyatt <lhyatt@gmail.com>2022-07-01 13:53:34 -0400
committerLewis Hyatt <lhyatt@gmail.com>2022-07-01 17:33:13 -0400
commitff64a8c951995cb1214b4d2864a4bd553b60f249 (patch)
tree6589f5a42a397e511767cbdc0b2c58eb08b7ea75 /gcc/gimple-range-infer.cc
parent1f76941c09f6f62f4cbf7a9f531ec95268dd2c0a (diff)
downloadgcc-ff64a8c951995cb1214b4d2864a4bd553b60f249.zip
gcc-ff64a8c951995cb1214b4d2864a4bd553b60f249.tar.gz
gcc-ff64a8c951995cb1214b4d2864a4bd553b60f249.tar.bz2
c++: Minor cleanup in parser.cc
The code to determine whether a given token starts a module directive is currently repeated in 4 places in parser.cc. I am about to submit a patch that needs to add it in a 5th place, so since the code is not completely trivial (needing to check for 3 different token types), it seems worthwhile to factor this logic into its own function. gcc/cp/ChangeLog: * parser.cc (cp_token_is_module_directive): New function refactoring common code. (cp_parser_skip_to_closing_parenthesis_1): Use the new function. (cp_parser_skip_to_end_of_statement): Likewise. (cp_parser_skip_to_end_of_block_or_statement): Likewise. (cp_parser_declaration): Likewise.
Diffstat (limited to 'gcc/gimple-range-infer.cc')
0 files changed, 0 insertions, 0 deletions