summaryrefslogtreecommitdiffstats
path: root/clang/lib/Format/UnwrappedLineParser.h
diff options
context:
space:
mode:
authorManuel Klimek <klimek@google.com>2013-05-28 13:42:28 +0000
committerManuel Klimek <klimek@google.com>2013-05-28 13:42:28 +0000
commit591ab5a83049a283bc6a8968149914a78dd84382 (patch)
tree18590f6637e2be9a540d2559a99d113b16d8f3b4 /clang/lib/Format/UnwrappedLineParser.h
parentfca012334b3663e15d46209934180ea9e2258f7c (diff)
downloadbcm5719-llvm-591ab5a83049a283bc6a8968149914a78dd84382.tar.gz
bcm5719-llvm-591ab5a83049a283bc6a8968149914a78dd84382.zip
Make UnwrappedLines and AnnotatedToken contain pointers to FormatToken.
The FormatToken is now not copyable any more. llvm-svn: 182772
Diffstat (limited to 'clang/lib/Format/UnwrappedLineParser.h')
-rw-r--r--clang/lib/Format/UnwrappedLineParser.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h
index 03505ff69a7..8e925597422 100644
--- a/clang/lib/Format/UnwrappedLineParser.h
+++ b/clang/lib/Format/UnwrappedLineParser.h
@@ -79,6 +79,11 @@ struct FormatToken {
/// 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 @@ struct UnwrappedLine {
// 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;
OpenPOWER on IntegriCloud