Index: clang-tidy/ClangTidyDiagnosticConsumer.cpp
===================================================================
--- clang-tidy/ClangTidyDiagnosticConsumer.cpp	(revision 221793)
+++ clang-tidy/ClangTidyDiagnosticConsumer.cpp	(working copy)
@@ -111,8 +111,16 @@
                                    SourceLocation Loc)
     : Message(Message) {
   assert(Loc.isValid() && Loc.isFileID());
-  FilePath = Sources.getFilename(Loc);
   FileOffset = Sources.getFileOffset(Loc);
+
+  // FilePath needs to be an absolute path, because it may be accessed later on
+  // with a different working directory.
+  SmallString<1024> AbsolutePath = Sources.getFilename(Loc);
+  std::error_code EC = llvm::sys::fs::make_absolute(AbsolutePath);
+  assert(!EC);
+  (void)EC;
+
+  FilePath.assign(AbsolutePath.begin(), AbsolutePath.end());
 }
 
 ClangTidyError::ClangTidyError(StringRef CheckName,
