[PATCH] D92874: [clangd] Validate clang-tidy Checks in clangd config.

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 10 08:16:14 PST 2020


sammccall added a comment.

Thanks for doing this!
I wonder a simpler version would reach the 80/20 point... if we were to validate only that entries *without wildcards* matched a check name, I think we'd catch most of the typos, and it'd just be a simple set lookup.
(`bugprone-*` is quadratically less likely to have a typo than a list of checks, because it's shorter and also large globs just don't appear as many times)



================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:362
+      static llvm::BumpPtrAllocator Alloc;
+      tidy::ClangTidyCheckFactories Factories;
+      for (tidy::ClangTidyModuleRegistry::entry E :
----------------
if you kept the ClangTidyCheckFactories alive forever, you can just use the StringRefs from its keys, right?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92874/new/

https://reviews.llvm.org/D92874



More information about the cfe-commits mailing list