[PATCH] D54943: [clang-tidy] implement new check 'misc-const-correctness' to add 'const' to unmodified variables
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 12 16:59:33 PDT 2022
sammccall added a comment.
FYI I've sent D135829 <https://reviews.llvm.org/D135829> to block this check from running in clangd, after tracking it down as the cause of a >10x regression in reparse times in a project that inadvertently enabled it (`misc-*`).
Looking at the implementation, this check seems to be expensive by design rather than some bug: it's matching many nodes, and then doing expensive nested analysis for each in the callback.
It's reasonable to want checks like that, OTOH it would be nice to have some way to distinguish them from the "classic" checks that aim to run in roughly linear time.
(It's not just clangd: we've had issues with a batch clang-tidy run over our codebase not finishing due to slow checks, and takes a lot of investigation before you can tell if this is a bug or not)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54943/new/
https://reviews.llvm.org/D54943
More information about the cfe-commits
mailing list