[PATCH] D95127: [flang][driver] Disallow non-existent input files in the frontend driver
Tim Keith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 25 07:53:32 PST 2021
tskeith added inline comments.
================
Comment at: flang/lib/Frontend/FrontendAction.cpp:37
+
+ // Return immediately if the input file does not exist or is not a file. Note
+ // that we cannot check this for input from stdin.
----------------
The input may be a regular file but still not readable, e.g. because of permissions. Should that be caught here too for consistency?
Why is this checking needed at all? The front end will report an error if it can't read the file.
================
Comment at: flang/test/Flang-Driver/missing-input.f90:14
+! RUN: not %flang-new 2>&1 | FileCheck %s --check-prefix=FLANG-NO-FILE
+! RUN: not %flang-new %t 2>&1 | FileCheck %s --check-prefix=FLANG-NONEXISITENT-FILE
+
----------------
`NONEXISITENT` -> `NONEXISTENT` ?
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