Make UnwrappedLines and AnnotatedToken contain pointers to FormatToken.
The FormatToken is now not copyable any more.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182772 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Format/UnwrappedLineParser.h b/lib/Format/UnwrappedLineParser.h
index 03505ff..8e92559 100644
--- a/lib/Format/UnwrappedLineParser.h
+++ b/lib/Format/UnwrappedLineParser.h
@@ -79,6 +79,11 @@
/// Contains the raw token text without leading whitespace and without leading
/// escaped newlines.
StringRef TokenText;
+
+private:
+ // Disallow copying.
+ FormatToken(const FormatToken &);
+ void operator=(const FormatToken &);
};
/// \brief An unwrapped line is a sequence of \c Token, that we would like to
@@ -93,7 +98,7 @@
// FIXME: Don't use std::list here.
/// \brief The \c Tokens comprising this \c UnwrappedLine.
- std::list<FormatToken> Tokens;
+ std::list<FormatToken *> Tokens;
/// \brief The indent level of the \c UnwrappedLine.
unsigned Level;