aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/Lexer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-22 06:20:42 +0000
committerChris Lattner <sabre@nondot.org>2008-11-22 06:20:42 +0000
commit306fda76b0818eb7c215094123f2e16729a44aed (patch)
tree886e5abe190a6bb3b4f44faffc0415539ed6046f /lib/Lex/Lexer.cpp
parentbcf6225ad69ea388e287f952981fd076636991b2 (diff)
remove a sneaky version of Diag hiding in PreprocessorLexer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59858 91177308-0d34-0410-b5e6-96231b3b80d8
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();
}