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));
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172351
91177308-0d34-0410-b5e6-
96231b3b80d8
(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)
TEST_F(FormatTest, FormatsNestedCall) {
verifyFormat("Method(f1, f2(f3));");
verifyFormat("Method(f1(f2, f3()));");
+ verifyFormat("Method(f1(f2, (f3())));");
}
//===----------------------------------------------------------------------===//