aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/clang/lib/Format/WhitespaceManager.h')
-rw-r--r--contrib/llvm-project/clang/lib/Format/WhitespaceManager.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h
index 24fe492dcb02..dc6f60e5deee 100644
--- a/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h
+++ b/contrib/llvm-project/clang/lib/Format/WhitespaceManager.h
@@ -282,6 +282,7 @@ private:
for (auto PrevIter = Start; PrevIter != End; ++PrevIter) {
// If we broke the line the initial spaces are already
// accounted for.
+ assert(PrevIter->Index < Changes.size());
if (Changes[PrevIter->Index].NewlinesBefore > 0)
NetWidth = 0;
NetWidth +=