[PATCH] D95127: [flang][driver] Disallow non-existent input files in the frontend driver
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 07:42:29 PST 2021
awarzynski marked 2 inline comments as done.
awarzynski added a comment.
@tskeith Thank for you reviewing! I think that this covers all of your suggestions.
================
Comment at: flang/lib/Frontend/FrontendAction.cpp:40
+ if (input.file() != "-") {
+ if (!llvm::vfs::getRealFileSystem()->exists(input.file())) {
+ ci.diagnostics().Report(clang::diag::err_fe_error_reading)
----------------
tskeith wrote:
> What happens if the argument exists but is not a file?
Updated - this will now make sure that the input:
* exists
* is not a directory
If any of these ^^^ is not true, a diagnostic is generated (different for each condition).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95127/new/
https://reviews.llvm.org/D95127
More information about the llvm-commits
mailing list