Index: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp =================================================================== --- clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp +++ clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp @@ -449,8 +449,12 @@ FullSourceLoc Loc; if (Info.getLocation().isValid() && Info.hasSourceManager()) Loc = FullSourceLoc(Info.getLocation(), Info.getSourceManager()); - Converter.emitDiagnostic(Loc, DiagLevel, Message, Info.getRanges(), + + StringRef FileName(Loc.printToString(Loc.getManager())); + if(getHeaderFilter()->match(FileName)) { + Converter.emitDiagnostic(Loc, DiagLevel, Message, Info.getRanges(), Info.getFixItHints()); + } if (Info.hasSourceManager()) checkFilters(Info.getLocation(), Info.getSourceManager());