Calculate the total length of a line up to each token up front.
This makes the tedious fitsIntoLimit() method unnecessary and I can
replace one hack (constructor initializers) by a slightly better hack.
Furthermore, this will enable calculating whether a certain part of a
line fits into the limit for future modifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172604 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 21a973d..c261732 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -88,6 +88,7 @@
UnwrappedLine() : Level(0), InPPDirective(false) {
}
+ // FIXME: Don't use std::list here.
/// \brief The \c Tokens comprising this \c UnwrappedLine.
std::list<FormatToken> Tokens;