dexonsmith added a subscriber: kadircet. dexonsmith added inline comments.
================ Comment at: clang/lib/Frontend/PrecompiledPreamble.cpp:571-579 + if (OverriddenFilesFS) { + std::unique_ptr<llvm::MemoryBuffer> Buffer; + if (moveOnNoError(OverriddenFilesFS->getBufferForFile(F.first()), + Buffer)) { + if (PreambleFileHash::createForMemoryBuffer(*Buffer) != F.second) + return false; + continue; ---------------- @kadircet, I'm curious if clang-tools-extra/clangd/Preamble.cpp's call to `ASTUnit::CanReuse` would benefit from this logic as well. I would guess clangd doesn't even try to reuse preambles when unsaved files have changed (since you might see the same crashes or wrong results I saw before adding this), but after this patch lands you might be able to do that safely. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91300/new/ https://reviews.llvm.org/D91300 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits