aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-11 21:14:08 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-11 21:14:08 +0000
commit67015ed2f40d6f69ee9e15d79aa88530f4b4afe2 (patch)
tree54057d74139ff8186cf6e55b7a497c93de5d14fb /lib/Format/Format.cpp
parent3315618561d19c99a7a52c72a31fb182111da716 (diff)
Formatter: Format ObjC static and instance methods consistently, add a test for that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index cee587bf32..77fba1fbf1 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -1342,8 +1342,9 @@ private:
Last->Tok.isNot(tok::kw_do) && Last->Tok.isNot(tok::r_brace) &&
Last->Tok.isNot(tok::kw_else) && Last->Tok.isNot(tok::kw_try) &&
Last->Tok.isNot(tok::kw_catch) && Last->Tok.isNot(tok::kw_for) &&
- // This gets rid of all ObjC @ keywords and - based definitions.
- Last->Tok.isNot(tok::at) && Last->Tok.isNot(tok::minus);
+ // This gets rid of all ObjC @ keywords and methods.
+ Last->Tok.isNot(tok::at) && Last->Tok.isNot(tok::minus) &&
+ Last->Tok.isNot(tok::plus);
while (!Last->Children.empty())
Last = &Last->Children.back();
if (!Last->Tok.is(tok::l_brace))