[PATCH] D126859: [clangd] Validate clang-tidy CheckOptions in clangd config
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 21 07:01:54 PDT 2022
sammccall added a comment.
FWIW, I think validating the names makes sense but I don't think typo correction pays for itself here. @kadircet?
================
Comment at: clang-tools-extra/clangd/TidyProvider.cpp:291
+ static void *call() {
+ return new tidy::NamesAndOptions(tidy::getAllChecksAndOptions(false));
+ }
----------------
it seems strange that clang-tidy provides this API to query what checks are linked in, but it constructs an expensive object every time rather than just creating a static one once and returning a reference to it. (i.e. the memoization is on the caller side)
Should we fix that API instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126859/new/
https://reviews.llvm.org/D126859
More information about the cfe-commits
mailing list