[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 10:23:34 PDT 2022


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h:35
+        TransformPointersAsValues(
+            Options.get("TransformPointersAsValues", false)) {}
+
----------------
JonasToth wrote:
> njames93 wrote:
> > It may be worth adding some validation to these. If AnalyzeValues, AnalyzeReferences and WarnPointersAsValues are all false, this whole check is basically a no-op.
> Whats the proper way to react? Short-circuit the `registerMatchers`, similar to language support?
> I think thats the way I would go about this.
`ClangTidyCheck::configurationDiag` is the way to warn about issues with config.


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

https://reviews.llvm.org/D54943



More information about the cfe-commits mailing list