[PATCH] D77942: [Preamble] Invalidate preamble when missing headers become present.
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 28 06:30:21 PDT 2020
kadircet added a comment.
mostly LG, sorry for not noticing regularfile check(or maybe forgetting a discussion ...) at previous revision
================
Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:108
+ // (We have some false negatives if PP recovered e.g. <foo> -> "foo")
+ if (File == nullptr)
+ return;
----------------
um, shouldn't this be
```
if (File != nullptr)
return;
```
? as we are only interested in not-found files?
================
Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:529
+ // If a mapped file was previously missing, then it has changed.
+ llvm::SmallString<127> MappedPath(R.first);
+ if (!VFS->makeAbsolute(MappedPath))
----------------
128 seems to be more widely used :P
================
Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:595
+ if (auto Status = VFS->status(F.getKey())) {
+ if (Status->isRegularFile())
+ return false;
----------------
what about others? at least symlinks ?
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