summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2015-02-17 09:58:03 +0000
committerDaniel Jasper <djasper@google.com>2015-02-17 09:58:03 +0000
commitd97d5d5cf75133ac8872a49f7615e357ab1e13da (patch)
tree8c8c1ba752ab37583ebcc613ea6b08c8b09a5435 /clang/lib/Format
parentfa27b8861b8ae1b9c686d8a50a6eeac72b874afb (diff)
downloadbcm5719-llvm-d97d5d5cf75133ac8872a49f7615e357ab1e13da.tar.gz
bcm5719-llvm-d97d5d5cf75133ac8872a49f7615e357ab1e13da.zip
clang-format: Fix crasher.
llvm-svn: 229485
Diffstat (limited to 'clang/lib/Format')
-rw-r--r--clang/lib/Format/ContinuationIndenter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp
index fa7c7f1d5d8..a02cb680728 100644
--- a/clang/lib/Format/ContinuationIndenter.cpp
+++ b/clang/lib/Format/ContinuationIndenter.cpp
@@ -365,7 +365,7 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
const FormatToken *Next = Previous.MatchingParen->getNextNonComment();
HasTrailingCall = Next && Next->isMemberAccess();
}
- if (HasTrailingCall &&
+ if (HasTrailingCall && State.Stack.size() > 1 &&
State.Stack[State.Stack.size() - 2].CallContinuation == 0)
State.Stack.back().LastSpace = State.Column;
}
OpenPOWER on IntegriCloud