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

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 02:52:17 PDT 2022

kadircet added a comment.

I agree with Sam on this one, especially on big files it just floods and hides non-stylistic diagnostics (you even hit max diagnostics exceeded errors).

I believe unless someone takes the extra mile to fix all the value types in LLVM to be const-correct, this is harmful then being useful. I can't speak for the projects out in the wild for the overall default (i have a personal preference for having everything const-correct, but it's mostly for stylistic reasons ...), but i think the default of diagnosing values for LLVM should definitely be off. Do you mind performing that change for `.clang-tidy` configs if others are not objecting on this either?

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list