[PATCH] D44463: [clangd] Don't expose vfs in TUScheduler::runWithPreamble.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 14 06:56:36 PDT 2018
sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.
================
Comment at: clangd/TUScheduler.h:94
/// Schedule an async read of the Preamble. Preamble passed to \p Action may
/// be built for any version of the file, callers must not rely on it being
----------------
I think this is the right place to describe the way FS interaction works (which implies why we don't propagate vfs):
```
/// The preamble may be stale, generated from an older version of the file.
/// Reading from locations in the preamble may cause the files to be re-read.
/// This gives callers two options:
/// - validate that the preamble is still valid, and only use it in this case
/// - accept that preamble contents may be outdated, and try to avoid reading source code from headers.
```
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44463
More information about the cfe-commits
mailing list