[PATCH] D48687: [clangd] Avoid duplicates in findDefinitions response
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 28 07:58:49 PDT 2018
ilya-biryukov added a comment.
I'm somewhat familiar with the internals of clang around the FileManager/VFS, so I could try creating the repro of this issue. The bugreport has enough info to get started. (Probably tomorrow, I certainly won't get to it today).
In https://reviews.llvm.org/D48687#1146645, @hokein wrote:
> 2. the absolute file path problem, we encountered similar problem in SymbolCollector, and we have similar function `ToURI` there, I think we can share the implementation instead of having different duplications.
+1 to sharing the code. I guess we're struggling with similar problems here. Any pointers to the functions we should use?
================
Comment at: unittests/clangd/TestTU.h:47
- ParsedAST build() const;
+ ParsedAST build(IntrusiveRefCntPtr<vfs::FileSystem> *OutFS = nullptr) const;
SymbolSlab headerSymbols() const;
----------------
simark wrote:
> ilya-biryukov wrote:
> > We don't need an extra output param here.
> > There's a way to get the vfs from the ASTContext: `ParsedAST().getASTContext().getSourceManager().getFileManager().getVirtualFileSystem()`.
> Thanks. It's just not obvious :).
Yeah, it is quite deeply hidden :-)
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48687
More information about the cfe-commits
mailing list