[clang-tools-extra] [clang-tidy] make `misc-const-correctness` work with `auto` variables and lambdas (PR #157319)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 28 15:00:03 PDT 2026


================
@@ -564,6 +564,10 @@ Changes in existing checks
   - Fixed false positive where a pointer used with placement new was
     incorrectly diagnosed as allowing the pointee to be made ``const``.
 
+  - Enabled the check for variables declared with ``auto`` (configurable
+    via the `AnalyzeAutoVariables` option) and lambdas (configurable
+    via `AnalyzeLambdas`).
----------------
EugeneZelenko wrote:

```suggestion
    via `AnalyzeLambdas` option).
```

https://github.com/llvm/llvm-project/pull/157319


More information about the cfe-commits mailing list