aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2013-01-10 00:25:19 +0000
committerNico Weber <nicolasweber@gmx.de>2013-01-10 00:25:19 +0000
commitb530fa374a8d4d96e61bf1dae8f4a73f4b3d2436 (patch)
tree18858375c5b14e74a9de295a4bfb4685b2b3fd30 /lib/Format/Format.cpp
parent50767d8c8f2f667255bdb99692c0467ce992bc67 (diff)
Formatter: @optional and @required go on their own line.
Previously: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void) optional; @required - (void) required; @end Now: @protocol myProtocol - (void)mandatoryWithInt:(int)i; @optional - (void)optional; @required - (void)required; @end git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index e271ba2e13..beea48e9a3 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -273,6 +273,7 @@ private:
void addTokenToState(bool Newline, bool DryRun, IndentState &State) {
const AnnotatedToken &Current = *State.NextToken;
const AnnotatedToken &Previous = *State.NextToken->Parent;
+ assert(State.Indent.size());
unsigned ParenLevel = State.Indent.size() - 1;
if (Newline) {
@@ -357,6 +358,7 @@ private:
/// accordingly.
void moveStateToNextToken(IndentState &State) {
const AnnotatedToken &Current = *State.NextToken;
+ assert(State.Indent.size());
unsigned ParenLevel = State.Indent.size() - 1;
if (Current.is(tok::lessless) && State.FirstLessLess[ParenLevel] == 0)