From f681fa8238b82822a3d939f0e4df80660666f8b1 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sat, 12 Jan 2013 07:05:25 +0000 Subject: [PATCH] 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 --- lib/Format/Format.cpp | 3 +-- 1 file changed, 1 insertion(+), 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)) -- 2.40.0