]> granicus.if.org Git - clang/commitdiff
use accessor instead of poking ivar directly
authorChris Lattner <sabre@nondot.org>
Fri, 13 Mar 2009 21:17:23 +0000 (21:17 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Mar 2009 21:17:23 +0000 (21:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66954 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Lex/PPDirectives.cpp
lib/Lex/PPLexerChange.cpp

index b38ff10c205607a92c47748740905f3ab2d78b32..5a4d2ee15e38196de4e7c4e29ebac8532aef6b9e 100644 (file)
@@ -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);
index 13e6126899d6b52e0e0029431cce513874e19027..7c1a08999826507c9d2e4dc0978abc6488245532 100644 (file)
@@ -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);