summaryrefslogtreecommitdiffstats
path: root/clang/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
commit57dab26be1a1e180963b51c631e655d022f14413 (patch)
treeb036c0b4558a7d6351a192ba552f93c725b5b05d /clang/lib/Lex/Lexer.cpp
parent20e11f8fc895cd96fab4c1565cfd8d2e0dfe35ed (diff)
downloadbcm5719-llvm-57dab26be1a1e180963b51c631e655d022f14413.tar.gz
bcm5719-llvm-57dab26be1a1e180963b51c631e655d022f14413.zip
remove a sneaky version of Diag hiding in PreprocessorLexer.
llvm-svn: 59858
Diffstat (limited to 'clang/lib/Lex/Lexer.cpp')
-rw-r--r--clang/lib/Lex/Lexer.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp
index 30875695899..cef848f073e 100644
--- a/clang/lib/Lex/Lexer.cpp
+++ b/clang/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();
}
OpenPOWER on IntegriCloud