[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
================
@@ -1019,10 +1019,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsRequiresClausesAndConcepts) {
Tokens = annotate("void f() & requires(true) {}");
EXPECT_EQ(Tokens.size(), 12u) << Tokens;
+ EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause);
EXPECT_TOKEN(Tokens[4], tok::amp, TT_PointerOrReference);
Tokens = annotate("void f() & requires(C<true, true>) {}");
EXPECT_EQ(Tokens.size(), 17u) << Tokens;
+ EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause);
EXPECT_TOKEN(Tokens[4], tok::amp, TT_PointerOrReference);
----------------
owenca wrote:
Ditto.
https://github.com/llvm/llvm-project/pull/65908
More information about the cfe-commits
mailing list