]> granicus.if.org Git - clang/commitdiff
Fix PR3077: tokens that come from macro expansions whose macro was
authorChris Lattner <sabre@nondot.org>
Sun, 16 Nov 2008 18:36:34 +0000 (18:36 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 16 Nov 2008 18:36:34 +0000 (18:36 +0000)
defined in a system header should be treated as system header tokens
even if they are instantiated in a different place.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59418 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Diagnostic.cpp

index c3ff10d427934ae289197b0d45986b1427409571..533a6a76ecd2bde5cc07d1ec6cd39c2ceee1a2c3 100644 (file)
@@ -234,7 +234,7 @@ void Diagnostic::Report(DiagnosticClient* C,
   if (SuppressSystemWarnings &&
       DiagID < diag::NUM_BUILTIN_DIAGNOSTICS &&
       getBuiltinDiagClass(DiagID) != ERROR &&
-      Loc.isValid() && Loc.isFileID() && Loc.isInSystemHeader())
+      Loc.isValid() && Loc.getPhysicalLoc().isInSystemHeader())
     return;
   
   if (DiagLevel >= Diagnostic::Error) {