From d6a2e7d71e9a910c45a3eb0268a5d94635003d58 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 12 Nov 2008 23:13:54 +0000 Subject: Move some diagnostic handling to PreprocessorLexer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59191 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PreprocessorLexer.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Lex/PreprocessorLexer.cpp') diff --git a/lib/Lex/PreprocessorLexer.cpp b/lib/Lex/PreprocessorLexer.cpp index f3d91af4ed..3c5d81b8a7 100644 --- a/lib/Lex/PreprocessorLexer.cpp +++ b/lib/Lex/PreprocessorLexer.cpp @@ -20,6 +20,13 @@ using namespace clang; PreprocessorLexer::~PreprocessorLexer() {} +void PreprocessorLexer::Diag(SourceLocation Loc, unsigned DiagID, + const std::string &Msg) const { + if (LexingRawMode && Diagnostic::isBuiltinNoteWarningOrExtension(DiagID)) + return; + PP->Diag(Loc, DiagID, Msg); +} + /// LexIncludeFilename - After the preprocessor has parsed a #include, lex and /// (potentially) macro expand the filename. void PreprocessorLexer::LexIncludeFilename(Token &FilenameTok) { -- cgit v1.2.1