[PATCH] D138505: [clangd] Don't run slow clang-tidy checks
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 23 02:35:44 PST 2022
njames93 added a comment.
In D138505#3944285 <https://reviews.llvm.org/D138505#3944285>, @sammccall wrote:
> Ideas on testing welcome. Does it make sense to rely on the fact that `misc-const-correctness` is always slow? :-D
I'd say it doesn't, if the check is ever updated in a way to be more performant it'd be nice if we don't need to change anything hard coded in clangd to enable it to run again.
================
Comment at: clang-tools-extra/clangd/ParsedAST.cpp:487
+ }
+ CTFactories = std::move(FastFactories);
+ }
----------------
Not exactly related but surely both check factories could be made into static variables and then just choose the factory based on the config.
================
Comment at: clang-tools-extra/clangd/tool/Check.cpp:468
+ // is counterproductive!
+ if (CheckTidyTime.getNumOccurrences())
+ F.Diagnostics.ClangTidy.SlowChecks = true;
----------------
How about changing this provide to always enable slow checks, but only use the provider if the flag is passed?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138505/new/
https://reviews.llvm.org/D138505
More information about the cfe-commits
mailing list