summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2014-06-10 06:39:03 +0000
committerDaniel Jasper <djasper@google.com>2014-06-10 06:39:03 +0000
commita84adb5368b30f73d2a413fb859aa93e523456db (patch)
tree69a845a41716b91b9686af560ccadf6c845990ff /unittests
parentc5e47d7fb3f3283ecb9712fc42fb7ad62dcb63bd (diff)
downloadclang-a84adb5368b30f73d2a413fb859aa93e523456db.tar.gz
clang-a84adb5368b30f73d2a413fb859aa93e523456db.tar.bz2
clang-a84adb5368b30f73d2a413fb859aa93e523456db.tar.xz
clang-format: Support variadic lambda captures.
Before: return [ i, args... ]{}; After: return [i, args...] {}; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 584ecba986..02636a7016 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -8709,6 +8709,9 @@ TEST_F(FormatTest, FormatsLambdas) {
" return j;\n"
" });");
+ // More complex introducers.
+ verifyFormat("return [i, args...] {};");
+
// Not lambdas.
verifyFormat("constexpr char hello[]{\"hello\"};");
verifyFormat("double &operator[](int i) { return 0; }\n"