diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Lex/PPDirectives.cpp | 2 | ||||
-rw-r--r-- | lib/Lex/PPLexerChange.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Lex/PPDirectives.cpp b/lib/Lex/PPDirectives.cpp index b38ff10c20..5a4d2ee15e 100644 --- a/lib/Lex/PPDirectives.cpp +++ b/lib/Lex/PPDirectives.cpp @@ -1314,7 +1314,7 @@ void Preprocessor::HandleDefineDirective(Token &DefineTok) { // It is very common for system headers to have tons of macro redefinitions // and for warnings to be disabled in system headers. If this is the case, // then don't bother calling MacroInfo::isIdenticalTo. - if (!Diags.getSuppressSystemWarnings() || + if (!getDiagnostics().getSuppressSystemWarnings() || !SourceMgr.isInSystemHeader(DefineTok.getLocation())) { if (!OtherMI->isUsed()) Diag(OtherMI->getDefinitionLoc(), diag::pp_macro_not_used); diff --git a/lib/Lex/PPLexerChange.cpp b/lib/Lex/PPLexerChange.cpp index 13e6126899..7c1a089998 100644 --- a/lib/Lex/PPLexerChange.cpp +++ b/lib/Lex/PPLexerChange.cpp @@ -238,7 +238,8 @@ bool Preprocessor::HandleEndOfFile(Token &Result, bool isEndOfMacro) { // This is the end of the top-level file. If the diag::pp_macro_not_used // diagnostic is enabled, look for macros that have not been used. - if (Diags.getDiagnosticLevel(diag::pp_macro_not_used) != Diagnostic::Ignored){ + if (getDiagnostics().getDiagnosticLevel(diag::pp_macro_not_used) != + Diagnostic::Ignored) { for (macro_iterator I = macro_begin(), E = macro_end(); I != E; ++I) if (!I->second->isUsed()) Diag(I->second->getDefinitionLoc(), diag::pp_macro_not_used); |