aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-01-13 08:19:51 +0000
committerDaniel Jasper <djasper@google.com>2013-01-13 08:19:51 +0000
commit4e9008ac62b4c403c5c30724953664dcbb03d02e (patch)
treeec7f713160c91e5756cd482b8b6cceffaf024b9d /lib/Format/Format.cpp
parent8134e1e575f862799c361b9c146eae7672010fa0 (diff)
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)); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 64a6224b0b..727e85fa4f 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -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)