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 | 66312a3ff419b291aa2977c110b79cd9cfa77886 (patch) | |
tree | a034556f3046e64dafaccfa0f5fd78dae0e474c4 /clang/lib/Lex/PreprocessorLexer.cpp | |
parent | 88ba5f0b96970496885e3b818744f295ea88c8c5 (diff) | |
download | bcm5719-llvm-66312a3ff419b291aa2977c110b79cd9cfa77886.tar.gz bcm5719-llvm-66312a3ff419b291aa2977c110b79cd9cfa77886.zip |
Move some diagnostic handling to PreprocessorLexer.
llvm-svn: 59191
Diffstat (limited to 'clang/lib/Lex/PreprocessorLexer.cpp')
-rw-r--r-- | clang/lib/Lex/PreprocessorLexer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Lex/PreprocessorLexer.cpp b/clang/lib/Lex/PreprocessorLexer.cpp index f3d91af4ed1..3c5d81b8a71 100644 --- a/clang/lib/Lex/PreprocessorLexer.cpp +++ b/clang/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) { |