[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 8 07:22:28 PST 2019
aaron.ballman added a comment.
Can you add test coverage that demonstrates the fix behaves as expected?
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:454-455
+ StringRef FileName(Loc.printToString(Loc.getManager()));
+ if(getHeaderFilter()->match(FileName))
+ {
+ Converter.emitDiagnostic(Loc, DiagLevel, Message, Info.getRanges(),
----------------
Formatting is incorrect here -- you should run the patch through clang-format (https://clang.llvm.org/docs/ClangFormat.html#script-for-patch-reformatting), and elide the braces.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59135/new/
https://reviews.llvm.org/D59135
More information about the cfe-commits
mailing list