On 27/10/2015 20:12, Heiko Eißfeldt wrote:
> I observed the following error when using shared folders with the vbfs file
> system.
> fatal error: file 'make.c' modified since it was first processed
Supplementary information: this diagnostic is misleading: while it used
to be triggered when the source file's st_mtime changed with respect to
the cached information (hence the text), right now it only checks
whether the *size* changes (according to the comments):
llvm/dist/clang/lib/Basic/SourceManager.cpp, line 136 ff.
//Check that the file's size is the same as in the file entry (which may
// have come from a stat cache).
if (getRawBuffer()->getBufferSize()!=(size_t)ContentsEntry->getSize()) {
if (Diag.isDiagnosticInFlight())
Diag.SetDelayedDiagnostic(diag::err_file_modified,
ContentsEntry->getName());
else
Diag.Report(Loc, diag::err_file_modified)
<< ContentsEntry->getName();
Buffer.setInt(Buffer.getInt() | InvalidFlag);
if (Invalid) *Invalid = true;
return Buffer.getPointer();
}
Also err_file_modified is a good moniker for searches through source.
My educated guess is that mtime comparisons were dropped because of too
much false negatives due to granularity problems...
Antoine