[PATCH] D91885: [clang-tidy] Add support for diagnostics with no location

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 3 09:51:01 PST 2020


aaron.ballman added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyCheck.h:183
+
+  /// Adds a diagnostic to report errors in the checks configuration.
+  DiagnosticBuilder
----------------
checks -> check's


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp:276
+      // Never ignore these.
+    } else if (!Context.isCheckEnabled(Error.DiagnosticName) &&
+               Error.DiagLevel != ClangTidyError::Error) {
----------------
Perhaps this is a bad idea, but would it make sense to have `isCheckEnabled()` report `true` for `clang-tidy-config`? It's not really a check, so that's a bit odd, but it seems like anywhere we're testing this property we wouldn't want to ignore config issues?


================
Comment at: clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.h:102
+
+  /// Report any errors to do with reading configuration using this method
+  DiagnosticBuilder
----------------
with reading configuration -> with reading the configuration

and add a full stop to the end of the comment.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91885



More information about the cfe-commits mailing list