[PATCH] D90531: [clangd][WIP] Start implementing clang-tidy options into clangd config
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 31 07:49:53 PDT 2020
njames93 added inline comments.
================
Comment at: clang-tools-extra/clangd/ConfigCompile.cpp:236-237
+ StringRef Type(IsPositive ? "Add" : "Remove");
+ // Don't support negating here, its handled if the item is in the Add or
+ // Remove list.
+ if (Str[0] == '-') {
----------------
Is this the direction we want to go, the first draft paper on this seems to suggest so.
================
Comment at: clang-tools-extra/clangd/ConfigTidyProvider.cpp:38-41
+ config::Params P;
+ P.Path = AbsoluteFilePath;
+ auto IgnoreDiag = [](const llvm::SMDiagnostic &) {};
+ Config C = ConfigProvider.getConfig(P, IgnoreDiag);
----------------
This definitely isn't right, but I'm unsure of the correct way to get the config for the specified file.
Is it better to not have this class share the interface of ClangTidyOptionsProvider and instead have it take an interface that takes a Config and a Filename and works from there instead?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90531/new/
https://reviews.llvm.org/D90531
More information about the cfe-commits
mailing list