From: Chris Lattner Date: Sun, 16 Nov 2008 18:36:34 +0000 (+0000) Subject: Fix PR3077: tokens that come from macro expansions whose macro was X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7f74fc1964527bcaeff1bdb979d67f8e9087097;p=clang Fix PR3077: tokens that come from macro expansions whose macro was 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 --- diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp index c3ff10d427..533a6a76ec 100644 --- a/lib/Basic/Diagnostic.cpp +++ b/lib/Basic/Diagnostic.cpp @@ -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) {