[clang] [clang-format] Fix requires misannotation with comma (PR #65908)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 16 12:56:36 PDT 2023


================
@@ -1135,6 +1145,14 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresExpressions) {
   EXPECT_TOKEN(Tokens[3], tok::kw_requires, TT_RequiresExpression);
   EXPECT_TOKEN(Tokens[4], tok::l_paren, TT_RequiresExpressionLParen);
   EXPECT_TOKEN(Tokens[14], tok::l_brace, TT_RequiresExpressionLBrace);
+
+  Tokens = annotate("bool foo = requires(C<true, true> c) {\n"
+                    "  { c.foo(); }\n"
+                    "}");
----------------
owenca wrote:

```suggestion
                    "};");
```

https://github.com/llvm/llvm-project/pull/65908


More information about the cfe-commits mailing list