From 41f4d68a50beeaeb821baa29b5591a7146b98b05 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 13 Sep 2019 13:18:55 +0000 Subject: clang-format: Add support for formatting (some) lambdas with explicit template parameters. This patch makes cases work where the lambda's template list doesn't contain any of + - ! ~ / % << | || && ^ == != >= <= ? : true false (see added FIXME). Ports r359967 to clang-format. Differential Revision: https://reviews.llvm.org/D67246 llvm-svn: 371854 --- clang/unittests/Format/FormatTest.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/unittests/Format/FormatTest.cpp') diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index f1a1160fa14..b1fcd39a49a 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -12923,6 +12923,10 @@ TEST_F(FormatTest, FormatsLambdas) { " return 1; //\n" "};"); + // Lambdas with explicit template argument lists. + verifyFormat( + "auto L = []