[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: [PATCH] D53958: [Tooling] Produce diagnostics for missing input files.
From: Sam McCall via Phabricator via cfe-commits <cfe-commits () lists ! llvm ! org>
Date: 2018-10-31 23:43:11
Message-ID: differential-rev-PHID-DREV-igbvc5khz6evjy7s3b4s-req () reviews ! llvm ! org
[Download RAW message or body]
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()) {
["D53958.172052.patch" (text/x-patch)]
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()) {
[Attachment #4 (text/plain)]
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic