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
return false;
if (Left.is(tok::l_brace) && Right.is(tok::r_brace))
return false;
+ if (Right.is(tok::ellipsis))
+ return false;
return true;
}
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"