[PATCH] D134049: [clang-format] Disallow trailing return arrows to be operators
Emilia Dreamer via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 16 09:54:21 PDT 2022
rymiel added inline comments.
================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:448
+ EXPECT_EQ(Tokens[11]->FakeLParens.size(), 0u);
+ EXPECT_TOKEN(Tokens[5], tok::kw_requires, TT_RequiresClause);
+
----------------
MyDeveloperDay wrote:
> should you not check that Tokens[21] is a TT_TrailingReturnArrow?
That's probably a good idea, thank you! (though the bug wasn't that `->` was misannotated, it was still a trailing return arrow, it just caused fake parentheses to be inserted earlier on)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134049/new/
https://reviews.llvm.org/D134049
More information about the cfe-commits
mailing list