diff options
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 = []<template <typename> class T, class U>(T<U> &&a) {};\n"); + // Multiple lambdas in the same parentheses change indentation rules. These // lambdas are forced to start on new lines. verifyFormat("SomeFunction(\n" @@ -12940,8 +12944,8 @@ TEST_F(FormatTest, FormatsLambdas) { " },\n" " 1);\n"); - // A multi-line lambda passed as arg1 forces arg0 to be pushed out, just like the arg0 - // case above. + // A multi-line lambda passed as arg1 forces arg0 to be pushed out, just like + // the arg0 case above. auto Style = getGoogleStyle(); Style.BinPackArguments = false; verifyFormat("SomeFunction(\n" |