[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 28 07:35:05 PDT 2020
sammccall marked 5 inline comments as done.
sammccall added inline comments.
================
Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:108
+ // (We have some false negatives if PP recovered e.g. <foo> -> "foo")
+ if (File == nullptr)
+ return;
----------------
kadircet wrote:
> um, shouldn't this be
>
> ```
> if (File != nullptr)
> return;
> ```
>
> ? as we are only interested in not-found files?
Yeah, I guess I should have run the tests :-)
================
Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:595
+ if (auto Status = VFS->status(F.getKey())) {
+ if (Status->isRegularFile())
+ return false;
----------------
kadircet wrote:
> what about others? at least symlinks ?
RealFileSystem::status() resolves symlinks (calls fs::status() with no `resolve` arg, defaults to true). That's the most important case, and other VFSes that support symlinks should really do the same for compatibility.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77942/new/
https://reviews.llvm.org/D77942
More information about the cfe-commits
mailing list