================ @@ -1296,6 +1296,21 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) { Tokens = annotate("bool x = t && requires(Foo<C1 || C2> x) { x.foo(); };"); ASSERT_EQ(Tokens.size(), 25u) << Tokens; EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresExpression); + + // Second function definition is required due to lookahead + Tokens = annotate("void f() & requires(n == 1) {}\nvoid g();"); ---------------- owenca wrote:
```suggestion Tokens = annotate("void f() &\n" " requires(n == 1)\n" "{}"); ``` IMO this is enough for checking the annotation part. https://github.com/llvm/llvm-project/pull/110942 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits