Author: sammccall Date: Fri Nov 9 03:49:22 2018 New Revision: 346485 URL: http://llvm.org/viewvc/llvm-project?rev=346485&view=rev Log: [Tooling] Avoid diagnosing missing input files in an edge-case where it's incorrect.
Modified: cfe/trunk/lib/Tooling/Tooling.cpp Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=346485&r1=346484&r2=346485&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/Tooling.cpp (original) +++ cfe/trunk/lib/Tooling/Tooling.cpp Fri Nov 9 03:49:22 2018 @@ -303,6 +303,12 @@ bool ToolInvocation::run() { const std::unique_ptr<driver::Driver> Driver( newDriver(&Diagnostics, BinaryName, Files->getVirtualFileSystem())); + // The "input file not found" diagnostics from the driver are useful. + // The driver is only aware of the VFS working directory, but some clients + // change this at the FileManager level instead. + // In this case the checks have false positives, so skip them. + if (!Files->getFileSystemOpts().WorkingDir.empty()) + Driver->setCheckInputsExist(false); const std::unique_ptr<driver::Compilation> Compilation( Driver->BuildCompilation(llvm::makeArrayRef(Argv))); if (!Compilation) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits