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:
Daniel Jasper 2013-01-13 08:19:51 +00:00
parent 5ef433fc0c
commit 48cb3b97c7
2 changed files with 3 additions and 0 deletions

View File

@ -1149,6 +1149,8 @@ private:
(Tok.is(tok::equal) || Tok.Parent->is(tok::equal)))
return false;
if (Tok.Parent->is(tok::comma))
return true;
if (Tok.Type == TT_IncludePath)
return Tok.is(tok::less) || Tok.is(tok::string_literal);
if (Tok.Type == TT_CtorInitializerColon || Tok.Type == TT_ObjCBlockLParen)

View File

@ -121,6 +121,7 @@ TEST_F(FormatTest, FormatsNestedBlockStatements) {
TEST_F(FormatTest, FormatsNestedCall) {
verifyFormat("Method(f1, f2(f3));");
verifyFormat("Method(f1(f2, f3()));");
verifyFormat("Method(f1(f2, (f3())));");
}
//===----------------------------------------------------------------------===//