================
@@ -3369,9 +3369,13 @@ bool clang::format::UnwrappedLineParser::parseRequires()
{
case tok::kw_volatile:
case tok::kw_const:
case tok::comma:
- FormatTok = Tokens->setPosition(StoredPosition);
- parseRequiresExpression(RequiresToken);
- return false;
+ if (OpenAngles == 0) {
+ FormatTok = Tokens->setPosition(StoredPosition);
+ parseRequiresExpression(RequiresToken);
+ return false;
+ } else {
+ break;
+ }
----------------
HazardyKnusperkeks wrote:
> The former is more consistent with the rest of the `switch` statement, except
> that there should be no `else` after the `return`. So I would prefer:
>
> ```
> if (OpenAngles == 0) {
> FormatTok = Tokens->setPosition(StoredPosition);
> parseRequiresExpression(RequiresToken);
> return false;
> }
> break;
> ```
Also good, no `else` is my main point.
https://github.com/llvm/llvm-project/pull/65908
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits