[PATCH] D88172: [clangd] Extract common file-caching logic from ConfigProvider.
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 25 02:32:24 PST 2020
njames93 added inline comments.
================
Comment at: clang-tools-extra/clangd/support/FileCache.cpp:59
+ // If the modified-time and size match, assume the content does too.
+ if (Size == Stat->getSize() &&
+ ModifiedTime == Stat->getLastModificationTime())
----------------
Is tracking the size really that important?
Modified time should be good enough. If someone modifies the file but ensures the mtime doesnt change you have to think there is a reason for that. Also a modification could preserve file size, in which case that wouldn't track anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88172/new/
https://reviews.llvm.org/D88172
More information about the cfe-commits
mailing list