[PATCH] D81920: [clangd] Change FSProvider::getFileSystem to take CurrentWorkingDirectory

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 26 11:29:47 PDT 2020


sammccall added a comment.

> And then in class RealFileSystemProvider, you want to override doGetDefaultFileSystem() while leaving doGetFileSystem untouched. Does that basically reflect your intent here?

Yes, except with fewer confusing names :-)

The name used now (there was a rename patch following this) is `ThreadsafeFS::view` - it took us a couple of years to work out what this abstraction really was.

The purpose of using the same name for the two public overloads is that they do the same thing. The purpose of using the same name for the public no-CWD version and the version to be overridden is that they *are* the same thing. These are more important reasons than the idea that non-existent non-polymorphic callers will miss an overload.

("More important" subjectively, but code always ends up stamped with the taste of the people working on it...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81920





More information about the cfe-commits mailing list