[PATCH] D59725: Additions to creduce script
Amy Huang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 25 17:47:59 PDT 2019
akhuang marked 2 inline comments as done.
akhuang added inline comments.
================
Comment at: clang/utils/creduce-clang-crash.py:223
+ if len(x) > 0 and x[-1].startswith('-') and not y.startswith('-'):
+ x[-1] += ' ' + y
+ return x
----------------
george.burgess.iv wrote:
> akhuang wrote:
> > george.burgess.iv wrote:
> > > Should we be `shlex.quote`'ing y here (and probably in the `return x + [y]` below)?
> > It quotes everything right before writing to file - are there reasons to quote here instead?
> We're `shlex.split`ing groups below, and I assume the intent is `Reduce.ungroup_args(Reduce.group_args_by_dash(args)) == args`.
>
> If we don't want to quote here, we can also have `ungroup_args` and `group_args_by_dash` deal in lists of nonempty lists.
good point- I guess the whole grouping thing is unnecessarily complicated, so I got rid of it and it now removes the next arg in `try_remove_arg_by_index`
================
Comment at: clang/utils/creduce-clang-crash.py:306
+ # Remove other cases that aren't covered by the heuristic
+ new_args = self.try_remove_args(new_args, msg="Removed -mllvm",
+ opts_one_arg_startswith=["-mllvm"])
----------------
george.burgess.iv wrote:
> george.burgess.iv wrote:
> > Probably want to do a similar thing for `-Xclang` (which, as far as this code is concerned, acts a lot like `-mllvm`)
> (You can ignore this comment if we're dealing in cc1; `-Xclang` is just "pass this directly as a cc1 arg")
ah, ok.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59725/new/
https://reviews.llvm.org/D59725
More information about the cfe-commits
mailing list