[PATCH] D59440: add steps to preprocess file and reduce command line args
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 18 11:57:31 PDT 2019
rnk added inline comments.
================
Comment at: clang/utils/creduce-clang-crash.py:106-117
+ # Check that an empty file is not interesting
+ # file_to_reduce is hardcoded into the test, so this is a roundabout
+ # way to run it on an empty file
+ _, tmpfile = tempfile.mkstemp()
+ _, empty_file = tempfile.mkstemp()
+ shutil.copy(file_to_reduce, tmpfile)
+ shutil.copy(empty_file, file_to_reduce)
----------------
Another way to do this without the complexity of swapping the files around is to construct the interestingness test to take the path to the file as a parameter (`$1`). CReduce always passes the path to the file being reduced as the first argument.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59440/new/
https://reviews.llvm.org/D59440
More information about the cfe-commits
mailing list