[PATCH] D90270: [clangd] Handle absolute/relative path specifications in Config

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 28 07:27:57 PDT 2020


kadircet added inline comments.


================
Comment at: clang-tools-extra/clangd/ConfigProvider.cpp:124
       std::vector<CompiledFragment> Result;
-      Cache.read(FS, DC, P.FreshTime, Result);
+      Cache.read(FS, DC, P.FreshTime, Fragment::SourceInfo::Absolute, Result);
       return Result;
----------------
sammccall wrote:
> this seems like a surprising place to encode this choice (why is fromYAMLFile coupled to the idea that it's a global config file not associated with any dir?)
It was mostly because the only user of `fromYAMLFile` was user-config provider. Would you rather have this as an additional parameter instead?

I can't see any other way of updating that information directly from the user, apart from changing the interface of `Provider` to have some sort of `setPathSpec` method.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90270



More information about the cfe-commits mailing list