forked from OSchip/llvm-project
Always put a space after ",".
I am not aware of a case where that would be wrong. The specific case I am fixing are function parameters wrapped in parenthesis (e.g. in macros). Before: function(a,(b)); After: function(a, (b)); llvm-svn: 172351
This commit is contained in:
parent
5ef433fc0c
commit
48cb3b97c7
|
@ -1149,6 +1149,8 @@ private:
|
||||||
(Tok.is(tok::equal) || Tok.Parent->is(tok::equal)))
|
(Tok.is(tok::equal) || Tok.Parent->is(tok::equal)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (Tok.Parent->is(tok::comma))
|
||||||
|
return true;
|
||||||
if (Tok.Type == TT_IncludePath)
|
if (Tok.Type == TT_IncludePath)
|
||||||
return Tok.is(tok::less) || Tok.is(tok::string_literal);
|
return Tok.is(tok::less) || Tok.is(tok::string_literal);
|
||||||
if (Tok.Type == TT_CtorInitializerColon || Tok.Type == TT_ObjCBlockLParen)
|
if (Tok.Type == TT_CtorInitializerColon || Tok.Type == TT_ObjCBlockLParen)
|
||||||
|
|
|
@ -121,6 +121,7 @@ TEST_F(FormatTest, FormatsNestedBlockStatements) {
|
||||||
TEST_F(FormatTest, FormatsNestedCall) {
|
TEST_F(FormatTest, FormatsNestedCall) {
|
||||||
verifyFormat("Method(f1, f2(f3));");
|
verifyFormat("Method(f1, f2(f3));");
|
||||||
verifyFormat("Method(f1(f2, f3()));");
|
verifyFormat("Method(f1(f2, f3()));");
|
||||||
|
verifyFormat("Method(f1(f2, (f3())));");
|
||||||
}
|
}
|
||||||
|
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
Loading…
Reference in New Issue