diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index 4734ff16921b1a..658773c10072aa 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -1646,6 +1646,7 @@ bool UnwrappedLineParser::tryToParseLambda() { case tok::lessequal: case tok::question: case tok::colon: + case tok::ellipsis: case tok::kw_true: case tok::kw_false: if (SeenArrow) { diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 1cd12476d788ee..ace4113393f010 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -14125,6 +14125,8 @@ TEST_F(FormatTest, FormatsLambdas) { " -> int {\n" " return 1; //\n" "};"); + verifyFormat("[]() -> Void {};"); + verifyFormat("[a, b]() -> Tuple { return {}; };"); // Lambdas with explicit template argument lists. verifyFormat(