forked from OSchip/llvm-project
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...); } llvm-svn: 181182
This commit is contained in:
parent
4e18ca5200
commit
10cd581f95
|
@ -1055,6 +1055,8 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line,
|
|||
return false;
|
||||
if (Left.is(tok::l_brace) && Right.is(tok::r_brace))
|
||||
return false;
|
||||
if (Right.is(tok::ellipsis))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -2602,6 +2602,11 @@ TEST_F(FormatTest, UnderstandsUsesOfStarAndAmp) {
|
|||
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"
|
||||
|
|
Loading…
Reference in New Issue