diff options
| author | Alexander Kornienko <alexfh@google.com> | 2013-09-02 13:58:14 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2013-09-02 13:58:14 +0000 |
| commit | 632abb9b21e0bb847d26c404f9c0b0dadf9ed0da (patch) | |
| tree | 98ffa7127d3dedec3b6b1a1bf1500ee9c5192960 /clang/lib/Format/TokenAnnotator.cpp | |
| parent | 9acf3dbf1da0a109376be2553ad5b36b420fadc9 (diff) | |
| download | bcm5719-llvm-632abb9b21e0bb847d26c404f9c0b0dadf9ed0da.tar.gz bcm5719-llvm-632abb9b21e0bb847d26c404f9c0b0dadf9ed0da.zip | |
Store first and last newline position in the token text for string literals and comments.
Summary:
Store first and last newline position in the token text for string literals and
comments to avoid doing .find('\n') for each possible solution.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1556
llvm-svn: 189758
Diffstat (limited to 'clang/lib/Format/TokenAnnotator.cpp')
| -rw-r--r-- | clang/lib/Format/TokenAnnotator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index 5b9802ddd6e..38a1c1a5e1e 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -1025,7 +1025,7 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) { Current->CanBreakBefore = Current->MustBreakBefore || canBreakBefore(Line, *Current); if (Current->MustBreakBefore || - (Current->is(tok::string_literal) && Current->IsMultiline)) + (Current->is(tok::string_literal) && Current->isMultiline())) Current->TotalLength = Current->Previous->TotalLength + Style.ColumnLimit; else Current->TotalLength = Current->Previous->TotalLength + |

