diff options
Diffstat (limited to 'lib/Lex/PreprocessorLexer.cpp')
-rw-r--r-- | lib/Lex/PreprocessorLexer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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) { |