aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Lex/Lexer.cpp')
-rw-r--r--lib/Lex/Lexer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Lex/Lexer.cpp b/lib/Lex/Lexer.cpp
index 3087569589..cef848f073 100644
--- a/lib/Lex/Lexer.cpp
+++ b/lib/Lex/Lexer.cpp
@@ -313,6 +313,11 @@ DiagnosticBuilder Lexer::Diag(const char *Loc, unsigned DiagID) const {
return PP->Diag(getSourceLocation(Loc), DiagID);
}
+DiagnosticBuilder Lexer::Diag(SourceLocation Loc, unsigned DiagID) const {
+ return PP->Diag(Loc, DiagID);
+}
+
+
//===----------------------------------------------------------------------===//
// Trigraph and Escaped Newline Handling Code.
//===----------------------------------------------------------------------===//
@@ -1148,9 +1153,7 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) {
// If we are in a #if directive, emit an error.
while (!ConditionalStack.empty()) {
- PreprocessorLexer::Diag(ConditionalStack.back().IfLoc,
- diag::err_pp_unterminated_conditional);
-
+ Diag(ConditionalStack.back().IfLoc, diag::err_pp_unterminated_conditional);
ConditionalStack.pop_back();
}