aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-10 19:36:35 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-10 19:36:35 +0000
commit81ed2f1cd7202e84bf1f3868a60a36904499c94c (patch)
tree67b489702e57a700941ed519620a34b6d64fdfd0 /lib/Format/Format.cpp
parent75dcea57daa9bd6316a04ebdeee7c0a08781473d (diff)
Formatter: Don't put a space in ObjC number literals like @+50
Before: @ -4.5 Now: @-4.5 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172095 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 406daac7a6..4d281047b8 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -946,7 +946,8 @@ private:
if (Tok.Parent->is(tok::equal) || Tok.Parent->is(tok::l_paren) ||
Tok.Parent->is(tok::comma) || Tok.Parent->is(tok::l_square) ||
Tok.Parent->is(tok::question) || Tok.Parent->is(tok::colon) ||
- Tok.Parent->is(tok::kw_return) || Tok.Parent->is(tok::kw_case))
+ Tok.Parent->is(tok::kw_return) || Tok.Parent->is(tok::kw_case) ||
+ Tok.Parent->is(tok::at))
return TT_UnaryOperator;
// There can't be to consecutive binary operators.
@@ -1054,7 +1055,8 @@ private:
return false;
if (Tok.Type == TT_UnaryOperator)
return Tok.Parent->isNot(tok::l_paren) &&
- Tok.Parent->isNot(tok::l_square);
+ Tok.Parent->isNot(tok::l_square) &&
+ Tok.Parent->isNot(tok::at);
if (Tok.Parent->is(tok::greater) && Tok.is(tok::greater)) {
return Tok.Type == TT_TemplateCloser && Tok.Parent->Type ==
TT_TemplateCloser && Style.SplitTemplateClosingGreater;