[PATCH] D128496: [clang-format] Further improve requires clause detection
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 24 00:14:10 PDT 2022
owenpan added inline comments.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3163-3169
+ default:
+ if (!PreviousNonComment->isTypeOrIdentifier()) {
+ // It's an expression.
+ parseRequiresExpression(RequiresToken);
+ return false;
+ }
+ LLVM_FALLTHROUGH;
----------------
It's harder to understand with the default case at the top without a break. See below.
================
Comment at: clang/lib/Format/UnwrappedLineParser.cpp:3185-3188
- default:
- // It's an expression.
- parseRequiresExpression(RequiresToken);
- return false;
----------------
How about this instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128496/new/
https://reviews.llvm.org/D128496
More information about the cfe-commits
mailing list