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

Björn Schäpers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 24 12:34:12 PST 2022


HazardyKnusperkeks added a comment.

In D113319#3339801 <https://reviews.llvm.org/D113319#3339801>, @curdeius wrote:

> 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);
>   }

This is addressed in D120511 <https://reviews.llvm.org/D120511>.


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