[cfe-commits] r172307 - /cfe/trunk/lib/Format/Format.cpp
Nico Weber
nicolasweber at gmx.de
Fri Jan 11 23:05:25 PST 2013
Author: nico
Date: Sat Jan 12 01:05:25 2013
New Revision: 172307
URL: http://llvm.org/viewvc/llvm-project?rev=172307&view=rev
Log:
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.
Modified:
cfe/trunk/lib/Format/Format.cpp
Modified: cfe/trunk/lib/Format/Format.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=172307&r1=172306&r2=172307&view=diff
==============================================================================
--- cfe/trunk/lib/Format/Format.cpp (original)
+++ cfe/trunk/lib/Format/Format.cpp Sat Jan 12 01:05:25 2013
@@ -386,8 +386,7 @@
}
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))
More information about the cfe-commits
mailing list