[clang] [clang-format] Fix requires misannotation with comma (PR #65908)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Sun Sep 10 13:18:33 PDT 2023
================
@@ -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:
I prefer the latter.
https://github.com/llvm/llvm-project/pull/65908
More information about the cfe-commits
mailing list