summaryrefslogtreecommitdiffstats
path: root/lib/Rewrite/HTMLRewrite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Rewrite/HTMLRewrite.cpp')
-rw-r--r--lib/Rewrite/HTMLRewrite.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Rewrite/HTMLRewrite.cpp b/lib/Rewrite/HTMLRewrite.cpp
index b4bf419..342b0e6 100644
--- a/lib/Rewrite/HTMLRewrite.cpp
+++ b/lib/Rewrite/HTMLRewrite.cpp
@@ -353,7 +353,8 @@ void html::SyntaxHighlight(Rewriter &R, FileID FID, const Preprocessor &PP) {
RewriteBuffer &RB = R.getEditBuffer(FID);
const SourceManager &SM = PP.getSourceManager();
- Lexer L(FID, SM, PP.getLangOptions());
+ const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID);
+ Lexer L(FID, FromFile, SM, PP.getLangOptions());
const char *BufferStart = L.getBufferStart();
// Inform the preprocessor that we want to retain comments as tokens, so we
@@ -444,7 +445,8 @@ void html::HighlightMacros(Rewriter &R, FileID FID, const Preprocessor& PP) {
const SourceManager &SM = PP.getSourceManager();
std::vector<Token> TokenStream;
- Lexer L(FID, SM, PP.getLangOptions());
+ const llvm::MemoryBuffer *FromFile = SM.getBuffer(FID);
+ Lexer L(FID, FromFile, SM, PP.getLangOptions());
// Lex all the tokens in raw mode, to avoid entering #includes or expanding
// macros.
OpenPOWER on IntegriCloud