use simplified Lexer ctor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62416 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Driver/DiagChecker.cpp b/Driver/DiagChecker.cpp
index 6503214..eeba859 100644
--- a/Driver/DiagChecker.cpp
+++ b/Driver/DiagChecker.cpp
@@ -118,12 +118,9 @@
// Create a raw lexer to pull all the comments out of the main file. We don't
// want to look in #include'd headers for expected-error strings.
FileID FID = PP.getSourceManager().getMainFileID();
- std::pair<const char*,const char*> File =
- PP.getSourceManager().getBufferData(FID);
// Create a lexer to lex all the tokens of the main file in raw mode.
- Lexer RawLex(PP.getSourceManager().getLocForStartOfFile(FID),
- PP.getLangOptions(), File.first, File.second);
+ Lexer RawLex(FID, PP.getSourceManager(), PP.getLangOptions());
// Return comments as tokens, this is how we find expected diagnostics.
RawLex.SetCommentRetentionState(true);