[PATCH] D113319: [clang-format] Improve require and concept handling

Marek Kurdej via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 23 01:31:38 PST 2022


curdeius added a comment.

Yep, confirmed, but I don't know how to fix it.
Just removing `TT_BinaryOperator` from `resetTokenMetadata` provokes these failures:

  [  FAILED  ] FormatTest.Concepts
  [  FAILED  ] FormatTest.RequiresClauses
  [  FAILED  ] TokenAnnotatorTest.UnderstandsRequiresClausesAndConcepts

Hopefully you have some idea how to fix it...

Oh, BTW, here's the test for the regression that Krasimir found:

  TEST_F(TokenAnnotatorTest, UnderstandsLoops) {
    auto Tokens = annotate("while (p < q && *p == 0) {}");
    EXPECT_EQ(Tokens.size(), 14u) << Tokens;
    EXPECT_TOKEN(Tokens[6], tok::star, TT_UnaryOperator);
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113319/new/

https://reviews.llvm.org/D113319



More information about the cfe-commits mailing list