diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 07:05:25 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-01-12 07:05:25 +0000 |
commit | f681fa8238b82822a3d939f0e4df80660666f8b1 (patch) | |
tree | 3a07a79563111c56cc6762a8ffb19136833dd565 /lib/Format/Format.cpp | |
parent | 774b97312ddffe64435a1428f904211ee46cf289 (diff) |
Formatter: Remove an always-false condition.
canBreakBefore() does not allow breaking after ':' for LT_ObjCMethodDecl lines,
so if Newline is true in addTokenToState() for ':' then LT_ObjCMethodDecl
cannot be set. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172307 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r-- | lib/Format/Format.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index 89fbf61da0..ec8b02ffca 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -386,8 +386,7 @@ private: } State.Stack[ParenLevel].LastSpace = State.Column; - if (Current.is(tok::colon) && CurrentLineType != LT_ObjCMethodDecl && - State.NextToken->Type != TT_ConditionalExpr) + if (Current.is(tok::colon) && State.NextToken->Type != TT_ConditionalExpr) State.Stack[ParenLevel].Indent += 2; } else { if (Current.is(tok::equal) && RootToken.is(tok::kw_for)) |