diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-04-10 01:17:16 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-04-10 01:17:16 +0000 |
commit | 584344f2ecd8be663ee161860be3f97c1f4cd064 (patch) | |
tree | 25a19e8588827ca87f9536f1445317b9d25e932b /clang/lib/Basic/SourceManager.cpp | |
parent | a4ae4e76938a8b777137b6e1cd2d7537ecdddfb5 (diff) | |
download | llvm-584344f2ecd8be663ee161860be3f97c1f4cd064.zip llvm-584344f2ecd8be663ee161860be3f97c1f4cd064.tar.gz llvm-584344f2ecd8be663ee161860be3f97c1f4cd064.tar.bz2 |
Disable diag::err_file_modified on Win32 completely, until someone cares to fix
it. PR6812.
- This is another attempt at silencing annoying buildbot failures.
llvm-svn: 100914
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r-- | clang/lib/Basic/SourceManager.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp index 27a859c..053cfe3 100644 --- a/clang/lib/Basic/SourceManager.cpp +++ b/clang/lib/Basic/SourceManager.cpp @@ -98,24 +98,26 @@ const llvm::MemoryBuffer *ContentCache::getBuffer(Diagnostic &Diag, << Entry->getName() << ErrorStr; Buffer.setInt(true); - } else if (FileInfo.st_size != Entry->getSize() + + // FIXME: This conditionalization is horrible, but we see spurious failures + // in the test suite due to this warning and no one has had time to hunt it + // down. So for now, we just don't emit this diagnostic on Win32, and hope + // nothing bad happens. + // + // PR6812. #if !defined(LLVM_ON_WIN32) - // In our regression testing, the Windows file system - // seems to have inconsistent modification times that - // sometimes erroneously trigger this error-handling - // path. - || FileInfo.st_mtime != Entry->getModificationTime() -#endif - ) { + } else if (FileInfo.st_size != Entry->getSize() || + FileInfo.st_mtime != Entry->getModificationTime()) { // Check that the file's size and modification time are the same // as in the file entry (which may have come from a stat cache). if (Diag.isDiagnosticInFlight()) - Diag.SetDelayedDiagnostic(diag::err_file_modified, + Diag.SetDelayedDiagnostic(diag::err_file_modified, Entry->getName()); - else + else Diag.Report(diag::err_file_modified) << Entry->getName(); Buffer.setInt(true); +#endif } } |