[PATCH] D53958: [Tooling] Produce diagnostics for missing input files.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 31 16:43:11 PDT 2018
sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added a subscriber: cfe-commits.
This was disabled way back in 2011, in the dark times before Driver was VFS-aware.
Also, make driver more VFS-aware :-)
This breaks one ClangTidy test (we improved the error message), will fix when
submitting.
Repository:
rC Clang
https://reviews.llvm.org/D53958
Files:
lib/Driver/Driver.cpp
lib/Tooling/Tooling.cpp
Index: lib/Tooling/Tooling.cpp
===================================================================
--- lib/Tooling/Tooling.cpp
+++ lib/Tooling/Tooling.cpp
@@ -303,8 +303,6 @@
const std::unique_ptr<driver::Driver> Driver(
newDriver(&Diagnostics, BinaryName, Files->getVirtualFileSystem()));
- // Since the input might only be virtual, don't check whether it exists.
- Driver->setCheckInputsExist(false);
const std::unique_ptr<driver::Compilation> Compilation(
Driver->BuildCompilation(llvm::makeArrayRef(Argv)));
if (!Compilation)
Index: lib/Driver/Driver.cpp
===================================================================
--- lib/Driver/Driver.cpp
+++ lib/Driver/Driver.cpp
@@ -1945,7 +1945,7 @@
}
}
- if (llvm::sys::fs::exists(Twine(Path)))
+ if (D.getVFS().exists(Path))
return true;
if (D.IsCLMode()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53958.172052.patch
Type: text/x-patch
Size: 860 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181031/7c68ac41/attachment.bin>
More information about the cfe-commits
mailing list