aboutsummaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
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)