diff options
author | Daniel Jasper <djasper@google.com> | 2012-12-10 18:59:13 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2012-12-10 18:59:13 +0000 |
commit | 8b39c6693aadd30f77ac039de69130c22e066994 (patch) | |
tree | 9927829344c1cd7732aba79260860e4e0c2b0a8a /lib/Format/Format.cpp | |
parent | 23add332da632c3cee7638b9d72b4ba8df67541c (diff) |
Addi formatting tests for pointer template parameters.
Fix spacing before ",".
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169746 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 7f1131ca6f..e8faa12a26 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -689,6 +689,8 @@ private: } bool spaceRequiredBetween(Token Left, Token Right) { + if (Right.is(tok::r_paren) || Right.is(tok::semi) || Right.is(tok::comma)) + return false; if (Left.is(tok::kw_template) && Right.is(tok::less)) return true; if (Left.is(tok::arrow) || Right.is(tok::arrow)) @@ -725,8 +727,6 @@ private: return false; if (Left.is(tok::hash)) return false; - if (Right.is(tok::r_paren) || Right.is(tok::semi) || Right.is(tok::comma)) - return false; if (Right.is(tok::l_paren)) { return !Left.isAnyIdentifier() || isIfForOrWhile(Left); } |