summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-05-05 12:36:29 +0000
committerDaniel Jasper <djasper@google.com>2014-05-05 12:36:29 +0000
commit0e6c51c889bcc2088613b05ae2ca2acb64dfedbf (patch)
tree1d70b171e8dff3562c437635a991bf04911fe4d5 /clang/unittests/Format/FormatTest.cpp
parent7721eb3f9d7bea88f138b2779b92a4ce04eab6da (diff)
downloadbcm5719-llvm-0e6c51c889bcc2088613b05ae2ca2acb64dfedbf.tar.gz
bcm5719-llvm-0e6c51c889bcc2088613b05ae2ca2acb64dfedbf.zip
clang-format: Improve understanding of decltype.
Before: SomeFunction([](decltype(x), A * a) {}); After: SomeFunction([](decltype(x), A *a) {}); llvm-svn: 207961
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 1380dd85a48..7db87cb3ce5 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -8432,6 +8432,9 @@ TEST_F(FormatTest, FormatsLambdas) {
verifyFormat("SomeFunction([]() { // A cool function...\n"
" return 43;\n"
"});");
+ verifyFormat("void f() {\n"
+ " SomeFunction([](decltype(x), A *a) {});\n"
+ "}");
// Lambdas with return types.
verifyFormat("int c = []() -> int { return 2; }();\n");
OpenPOWER on IntegriCloud