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

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 06:18:56 PDT 2022


JonasToth added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/misc/ConstCorrectnessCheck.h:35
+        TransformPointersAsValues(
+            Options.get("TransformPointersAsValues", false)) {}
+
----------------
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.


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

https://reviews.llvm.org/D54943



More information about the cfe-commits mailing list