================
@@ -3351,9 +3356,18 @@ class ExpressionParser {
// Consume scopes: (), [], <> and {}
// In addition to that we handle require clauses as scope, so that the
// constraints in that are correctly indented.
- if (Current->opensScope() ||
- Current->isOneOf(TT_RequiresClause,
+ if (Current->isOneOf(TT_RequiresClause,
TT_RequiresClauseInARequiresExpression)) {
+ const auto *End = Current;
+ while (End && !End->ClosesRequiresClause)
+ End = End->Next;
+
+ const auto *PreviousLimit = RequiresClauseLimit;
+ RequiresClauseLimit = End ? End->getNextNonComment() : PreviousLimit;
+ next();
+ parse();
+ RequiresClauseLimit = PreviousLimit;
----------------
HazardyKnusperkeks wrote:
Especially this seems not to be relevant to the added tests. Either it's not
needed, or add a test which needs this, or explain to me, why/where it applies.
https://github.com/llvm/llvm-project/pull/220792
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits