[clang] [clang-format] Fix a bug in annotating lambda l_square (PR #95084)

Emilia Kond via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 09:12:30 PDT 2024


================
@@ -1591,6 +1591,12 @@ TEST_F(TokenAnnotatorTest, UnderstandsLambdas) {
   EXPECT_TOKEN(Tokens[15], tok::arrow, TT_TrailingReturnArrow);
   EXPECT_TOKEN(Tokens[17], tok::l_brace, TT_LambdaLBrace);
 
+  Tokens = annotate("auto l = [] -> struct S { return {}; };");
----------------
rymiel wrote:

Is the assignment to a variable necessary? None of the other lambda tests have this

https://github.com/llvm/llvm-project/pull/95084


More information about the cfe-commits mailing list