summaryrefslogtreecommitdiffstats
path: root/lib/Rewrite
diff options
context:
space:
mode:
authorAlexander Kornienko <alexfh@google.com>2013-06-04 16:58:03 +0000
committerAlexander Kornienko <alexfh@google.com>2013-06-04 16:58:03 +0000
commit49e1d9814a34e4024a347c2fce8e9567c40e6bf5 (patch)
tree59b2569ab97ef19ef0ce59f7e784f87aa451f3fc /lib/Rewrite
parent48eff6c3512fd6c768072b05ab4c287c7719072b (diff)
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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183236 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Rewrite')
-rw-r--r--lib/Rewrite/Core/HTMLRewrite.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Rewrite/Core/HTMLRewrite.cpp b/lib/Rewrite/Core/HTMLRewrite.cpp
index 2d279f1ee4..2a5442afcd 100644
--- a/lib/Rewrite/Core/HTMLRewrite.cpp
+++ b/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.