diff --git a/clang/Lex/Lexer.cpp b/clang/Lex/Lexer.cpp index 4a6f2d416b92..4164454d0b60 100644 --- a/clang/Lex/Lexer.cpp +++ b/clang/Lex/Lexer.cpp @@ -40,7 +40,6 @@ static void InitCharacterInfo(); Lexer::Lexer(const SourceBuffer *File, unsigned fileid, Preprocessor &pp, const char *BufStart, const char *BufEnd) : BufferPtr(BufStart ? BufStart : File->getBufferStart()), - BufferStart(BufferPtr), BufferEnd(BufEnd ? BufEnd : File->getBufferEnd()), InputFile(File), CurFileID(fileid), PP(pp), Features(PP.getLangOptions()) { Is_PragmaLexer = false; diff --git a/clang/Lex/Preprocessor.cpp b/clang/Lex/Preprocessor.cpp index 6faf966e411e..28e49768a6e2 100644 --- a/clang/Lex/Preprocessor.cpp +++ b/clang/Lex/Preprocessor.cpp @@ -420,7 +420,7 @@ void Preprocessor::EnterSourceFileWithLexer(Lexer *TheLexer, SourceMgr.getFileEntryForFileID(CurLexer->getCurFileID())) FileType = getFileInfo(FE).DirInfo; - FileChangeHandler(CurLexer->getSourceLocation(CurLexer->BufferStart), + FileChangeHandler(SourceLocation(CurLexer->getCurFileID(), 0), EnterFile, FileType); } } diff --git a/clang/include/clang/Lex/Lexer.h b/clang/include/clang/Lex/Lexer.h index bb978c3f36e7..349e5f903172 100644 --- a/clang/include/clang/Lex/Lexer.h +++ b/clang/include/clang/Lex/Lexer.h @@ -52,7 +52,6 @@ struct LangOptions { /// on the specified Preprocessor object to handle preprocessor directives, etc. class Lexer { const char *BufferPtr; // Current pointer into the buffer. - const char * const BufferStart;// Start of the buffer. const char * const BufferEnd; // End of the buffer. const SourceBuffer *InputFile; // The file we are reading from. unsigned CurFileID; // FileID for the current input file.