diff options
Diffstat (limited to 'lib/Lex/PPLexerChange.cpp')
-rw-r--r-- | lib/Lex/PPLexerChange.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index bb2536d1e6..cd50f0e38f 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -275,16 +275,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { if (Callbacks && !isEndOfMacro && CurPPLexer) { SrcMgr::CharacteristicKind FileType = SourceMgr.getFileCharacteristic(CurPPLexer->getFileID()); - - if (CurLexer) { - Callbacks->FileChanged(CurLexer->getSourceLocation(CurLexer->BufferPtr), - PPCallbacks::ExitFile, FileType); - } - else { - // FIXME: Is this okay to use the location of 'Result'? - Callbacks->FileChanged(Result.getLocation(), PPCallbacks::ExitFile, - FileType); - } + Callbacks->FileChanged(CurPPLexer->getSourceLocation(), + PPCallbacks::ExitFile, FileType); } // Client should lex another token. |