diff options
author | Alexander Kornienko <alexfh@google.com> | 2013-06-04 16:58:03 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2013-06-04 16:58:03 +0000 |
commit | 33a35dff8305e01d15fbf881f500ac7ad1b020f1 (patch) | |
tree | aba9068e44dc7c0c5063f5106b1737bb2c8c56c0 /clang/lib/Rewrite/Core/HTMLRewrite.cpp | |
parent | f0dc11ad7f5ca007636a3e6fdc69adf878768bc3 (diff) | |
download | bcm5719-llvm-33a35dff8305e01d15fbf881f500ac7ad1b020f1.tar.gz bcm5719-llvm-33a35dff8305e01d15fbf881f500ac7ad1b020f1.zip |
Added Lexer::getBufferEnd().
Summary:
There's Lexer::getBufferStart(), and we need getBufferEnd() to access
the whole input buffer in clang::format::reformat. We don't want to
rely on the fact that the Lexer::BufferEnd always points to '\0', as there can
be embedded '\0's as well.
Reviewers: jordan_rose
Reviewed By: jordan_rose
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D916
llvm-svn: 183236
Diffstat (limited to 'clang/lib/Rewrite/Core/HTMLRewrite.cpp')
-rw-r--r-- | clang/lib/Rewrite/Core/HTMLRewrite.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Rewrite/Core/HTMLRewrite.cpp b/clang/lib/Rewrite/Core/HTMLRewrite.cpp index 2d279f1ee4a..2a5442afcd5 100644 --- a/clang/lib/Rewrite/Core/HTMLRewrite.cpp +++ b/clang/lib/Rewrite/Core/HTMLRewrite.cpp @@ -361,7 +361,7 @@ void html::SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP) { const SourceManager &SM = PP.getSourceManager(); const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID); Lexer L(FID, FromFile, SM, PP.getLangOpts()); - const char *BufferStart = L.getBufferStart(); + const char *BufferStart = L.getBuffer().data(); // Inform the preprocessor that we want to retain comments as tokens, so we // can highlight them. |