summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 371fa0f3d22..ecd78b24d09 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -9967,6 +9967,9 @@ TEST_F(FormatTest, FormatsLambdas) {
" : Field([] { // comment\n"
" int i;\n"
" }) {}");
+ verifyFormat("auto my_lambda = [](const string &some_parameter) {\n"
+ " return some_parameter.size();\n"
+ "};");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");
OpenPOWER on IntegriCloud