summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-12 07:05:25 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-12 07:05:25 +0000
commitcb465dcb1dee305a5e0470486c0495d7a7da4a25 (patch)
tree924059bd2cdf9c8ba9ce54f924ededeade44863f /clang/lib
parentc7a56342bd94dd4f57a443fca1c82286d3cb8229 (diff)
downloadbcm5719-llvm-cb465dcb1dee305a5e0470486c0495d7a7da4a25.tar.gz
bcm5719-llvm-cb465dcb1dee305a5e0470486c0495d7a7da4a25.zip
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. llvm-svn: 172307
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Format/Format.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp
index 89fbf61da0d..ec8b02ffcad 100644
--- a/clang/lib/Format/Format.cpp
+++ b/clang/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))
OpenPOWER on IntegriCloud