[PATCH] D102519: [clangd] Set FileSystem for tweaks in Check tool.
Utkarsh Saxena via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon May 17 02:10:31 PDT 2021
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0e7c7d461df1: [clangd] Set FileSystem for tweaks in Check tool. (authored by usaxena95).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102519/new/
https://reviews.llvm.org/D102519
Files:
clang-tools-extra/clangd/tool/Check.cpp
Index: clang-tools-extra/clangd/tool/Check.cpp
===================================================================
--- clang-tools-extra/clangd/tool/Check.cpp
+++ clang-tools-extra/clangd/tool/Check.cpp
@@ -212,8 +212,13 @@
AST->getTokens(), Start, End);
Tweak::Selection Selection(&Index, *AST, Start, End, std::move(Tree),
nullptr);
- for (const auto &T :
- prepareTweaks(Selection, Opts.TweakFilter, Opts.FeatureModules)) {
+ // FS is only populated when applying a tweak, not during prepare as
+ // prepare should not do any I/O to be fast.
+ auto Tweaks =
+ prepareTweaks(Selection, Opts.TweakFilter, Opts.FeatureModules);
+ Selection.FS =
+ &AST->getSourceManager().getFileManager().getVirtualFileSystem();
+ for (const auto &T : Tweaks) {
auto Result = T->apply(Selection);
if (!Result) {
elog(" tweak: {0} ==> FAIL: {1}", T->id(), Result.takeError());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102519.345794.patch
Type: text/x-patch
Size: 1037 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210517/2f0ce282/attachment.bin>
More information about the cfe-commits
mailing list