diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-11-12 23:13:54 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-11-12 23:13:54 +0000 |
commit | d6a2e7d71e9a910c45a3eb0268a5d94635003d58 (patch) | |
tree | 17c208f99eaa5e4b60d56cc6fc5060af02bcc51e /lib/Lex/PreprocessorLexer.cpp | |
parent | 2c71d0f00e40b7b0a85561d430f52247b9c6e7f2 (diff) |
Move some diagnostic handling to PreprocessorLexer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59191 91177308-0d34-0410-b5e6-96231b3b80d8
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) { |