Don't put a space before ellipsis.
Before: template <class ... Ts> void Foo(Ts ... ts) { Foo(ts ...); }
After: template <class... Ts> void Foo(Ts... ts) { Foo(ts...); }
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181182 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 45c8e81..ed1e6ed 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -2602,6 +2602,11 @@
verifyGoogleFormat("A = new SomeType* [Length];");
}
+TEST_F(FormatTest, UnderstandsEllipsis) {
+ verifyFormat("int printf(const char *fmt, ...);");
+ verifyFormat("template <class... Ts> void Foo(Ts... ts) { Foo(ts...); }");
+}
+
TEST_F(FormatTest, AdaptivelyFormatsPointersAndReferences) {
EXPECT_EQ("int *a;\n"
"int *a;\n"