[PATCH] D91029: [clangd] Implement clang-tidy options from config
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 12 04:35:03 PST 2020
njames93 added a comment.
Thanks for the comments, I agree it was a little too much. Likely due in part to how I first tried to mirror the interface of ClangTidyOptionsProvider.
================
Comment at: clang-tools-extra/clangd/ParsedAST.cpp:250
if (Preamble && Preamble->StatCache)
- VFS = Preamble->StatCache->getConsumingFS(std::move(VFS));
+ VFS = Preamble->StatCache->getConsumingFS(VFS.get());
----------------
sammccall wrote:
> why this change?
So we can use the same VFS a bit further down. However as thats not a thing now it can be reverted.
================
Comment at: clang-tools-extra/clangd/ParsedAST.cpp:310
CTContext->setCurrentFile(Filename);
+ dlog("ClangTidy configuration for file {0}: {1}", Filename,
+ tidy::configurationAsText(CTContext->getOptions()));
----------------
sammccall wrote:
> nit: move a few lines above to after the options-initialization if-stmt?
The options for the context are only sourced once the currentFile has been set
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91029/new/
https://reviews.llvm.org/D91029
More information about the cfe-commits
mailing list