diff options
| author | Manuel Klimek <klimek@google.com> | 2013-05-28 13:42:28 +0000 |
|---|---|---|
| committer | Manuel Klimek <klimek@google.com> | 2013-05-28 13:42:28 +0000 |
| commit | dcb3f2aab329c80e97a44312d15299df4dc059be (patch) | |
| tree | 603447b773de1594255d543f1d7aa3d4f5611594 /lib/Format/UnwrappedLineParser.cpp | |
| parent | 44065a7e129dd6c77c0564dbf14109cf5b3f209a (diff) | |
| download | clang-dcb3f2aab329c80e97a44312d15299df4dc059be.tar.gz clang-dcb3f2aab329c80e97a44312d15299df4dc059be.tar.bz2 clang-dcb3f2aab329c80e97a44312d15299df4dc059be.tar.xz | |
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
Diffstat (limited to 'lib/Format/UnwrappedLineParser.cpp')
| -rw-r--r-- | lib/Format/UnwrappedLineParser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Format/UnwrappedLineParser.cpp b/lib/Format/UnwrappedLineParser.cpp index 2d44cdb12f..f74fbc10ec 100644 --- a/lib/Format/UnwrappedLineParser.cpp +++ b/lib/Format/UnwrappedLineParser.cpp @@ -1022,10 +1022,10 @@ void UnwrappedLineParser::addUnwrappedLine() { DEBUG({ llvm::dbgs() << "Line(" << Line->Level << ")" << (Line->InPPDirective ? " MACRO" : "") << ": "; - for (std::list<FormatToken>::iterator I = Line->Tokens.begin(), - E = Line->Tokens.end(); + for (std::list<FormatToken *>::iterator I = Line->Tokens.begin(), + E = Line->Tokens.end(); I != E; ++I) { - llvm::dbgs() << I->Tok.getName() << " "; + llvm::dbgs() << (*I)->Tok.getName() << " "; } llvm::dbgs() << "\n"; @@ -1107,9 +1107,9 @@ void UnwrappedLineParser::readToken() { } void UnwrappedLineParser::pushToken(FormatToken *Tok) { - Line->Tokens.push_back(*Tok); + Line->Tokens.push_back(Tok); if (MustBreakBeforeNextToken) { - Line->Tokens.back().MustBreakBefore = true; + Line->Tokens.back()->MustBreakBefore = true; MustBreakBeforeNextToken = false; } } |
