[clang] [clang-format] Fix formatting with consecutive requires clauses (PR #220792)
Abdul Mohammad via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 6 21:05:39 PDT 2026
================
@@ -3259,14 +3259,17 @@ class ExpressionParser {
void parse(int Precedence = 0) {
// Skip 'return' and ObjC selector colons as they are not part of a binary
// expression.
- while (Current && (Current->is(tok::kw_return) ||
- (Current->is(tok::colon) &&
- Current->isOneOf(TT_ObjCMethodExpr, TT_DictLiteral)))) {
+ while (Current && Current != RequiresClauseLimit &&
----------------
abdulm5 wrote:
Your right, only the main-loop boundary check and the check after the recursive parse() call are the necessary ones, everything else is redundant.
https://github.com/llvm/llvm-project/pull/220792
More information about the cfe-commits
mailing list