diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-07-15 07:38:35 -0700 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-07-15 07:41:30 -0700 |
commit | 765fbbf9bb398560f45987ea9858dfaaefff5ce0 (patch) | |
tree | e669911f01e67c1bb48cbb4c13009c629f018748 /gcc/omp-expand.c | |
parent | 790b1f64157b53265f85ad9a093cdce03761db87 (diff) | |
download | gcc-765fbbf9bb398560f45987ea9858dfaaefff5ce0.zip gcc-765fbbf9bb398560f45987ea9858dfaaefff5ce0.tar.gz gcc-765fbbf9bb398560f45987ea9858dfaaefff5ce0.tar.bz2 |
c++: refactor some parser code
cp_parser_declaration copies tokens to local variables, before inspecting
(some of) their fields. There's no need. Just point at them in the token
buffer -- they don't move. Also, we never look at the second token if the
first is EOF, so no need for some kind of dummy value in that case.
gcc/cp/
* parser.c (cp_parser_declaration): Avoid copying tokens.
(cp_parser_block_declaration): RAII token pointer.
Diffstat (limited to 'gcc/omp-expand.c')
0 files changed, 0 insertions, 0 deletions