[PATCH] D156370: [clang-format] Fix bug with parsing of function/variable names.
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 14:28:06 PST 2023
owenpan accepted this revision.
owenpan added inline comments.
================
Comment at: clang/lib/Format/TokenAnnotator.cpp:2222-2224
if (PreviousNotConst->is(tok::r_paren) &&
- PreviousNotConst->is(TT_TypeDeclarationParen)) {
+ (PreviousNotConst->isOneOf(TT_TypeDeclarationParen,
+ TT_AttributeRParen))) {
----------------
We should annotate parens separately as LParen and RParen like we recently did with braces. Then we could simply do:
```
if (PreviousNotConst->isOneOf(TT_TypeDeclarationRParen, TT_AttributeRParen))
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156370/new/
https://reviews.llvm.org/D156370
More information about the cfe-commits
mailing list