[PATCH] D130299: [clang-format] FIX: Misannotation 'auto' as trailing return type in lambdas
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jul 23 20:54:25 PDT 2022
owenpan accepted this revision.
owenpan added inline comments.
================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:752
+TEST_F(TokenAnnotatorTest, UnderstandsTrailingReturnTypeAutoInLabmdas) {
+ auto Tokens = annotate("[]() -> auto {}");
----------------
HazardyKnusperkeks wrote:
> I'd just merge it with the test above.
> I'd just merge it with the test above.
+1.
================
Comment at: clang/unittests/Format/TokenAnnotatorTest.cpp:753-756
+ auto Tokens = annotate("[]() -> auto {}");
+ ASSERT_EQ(Tokens.size(), 9u) << Tokens;
+ EXPECT_TOKEN(Tokens[4], tok::arrow, TT_LambdaArrow);
+ EXPECT_TOKEN(Tokens[6], tok::l_brace, TT_LambdaLBrace);
----------------
Should we add a test case with an `&` between `auto` and `{`?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130299/new/
https://reviews.llvm.org/D130299
More information about the cfe-commits
mailing list