[PATCH] D59135: Add check for matching HeaderFilter before emitting Diagnostic

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 13 07:02:19 PDT 2019


alexfh added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:454
+  StringRef FileName(Loc.printToString(Loc.getManager()));
+  if(getHeaderFilter()->match(FileName))
+  {
----------------
aaron.ballman wrote:
> 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.
I believe, this will break the handling of notes. If the notes attached to the diagnostic are in the "interesting" part of the code (see the checkFilters method below), the whole diagnostic should be treated as such.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59135/new/

https://reviews.llvm.org/D59135





More information about the cfe-commits mailing list