[PATCH] D59725: Additions to creduce script

2019-04-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: cfe/trunk/utils/creduce-clang-crash.py:185 +for msg in self.expected_output: + output += 'grep %s t.log || exit 1\n' % pipes.quote(msg) + akhuang wrote: > lebedev.ri wrote: > > akhuang wrote: > > > lebedev.ri

[PATCH] D59725: Additions to creduce script

2019-04-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: cfe/trunk/utils/creduce-clang-crash.py:185 +for msg in self.expected_output: + output += 'grep %s t.log || exit 1\n' % pipes.quote(msg) + lebedev.ri wrote: > akhuang wro

[PATCH] D59725: Additions to creduce script

2019-04-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: cfe/trunk/utils/creduce-clang-crash.py:185 +for msg in self.expected_output: + output += 'grep %s t.log || exit 1\n' % pipes.quote(msg) + akhuang wrote: > lebedev.ri wrote: > > >>! In D59725#1477362, @arichar

[PATCH] D59725: Additions to creduce script

2019-04-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked an inline comment as done. akhuang added inline comments. Comment at: cfe/trunk/utils/creduce-clang-crash.py:185 +for msg in self.expected_output: + output += 'grep %s t.log || exit 1\n' % pipes.quote(msg) + lebedev.ri wrote: > >>! In D597

[PATCH] D59725: Additions to creduce script

2019-04-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: cfe/trunk/utils/creduce-clang-crash.py:185 +for msg in self.expected_output: + output += 'grep %s t.log || exit 1\n' % pipes.quote(msg) + >>! In D59725#1477362, @arichardson wrote: >>>! In D59725#1477042, @le

[PATCH] D59725: Additions to creduce script

2019-04-24 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D59725#1477042 , @lebedev.ri wrote: > I've stumbled into an issue with the script: > It got a line: `clang: > /build/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2582: bool > {anonymous}::IndVarSimplify::run(llvm::Loop*)

[PATCH] D59725: Additions to creduce script

2019-04-24 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. I've stumbled into an issue with the script: It got a line: `clang: /build/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:2582: bool {anonymous}::IndVarSimplify::run(llvm::Loop*): Assertion `L->isRecursivelyLCSSAForm(*DT, *LI) && "LCSSA required to run indvars!"' fai

[PATCH] D59725: Additions to creduce script

2019-03-29 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357290: Various fixes and additions to creduce-clang-crash.py (authored by gbiv, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://r

[PATCH] D59725: Additions to creduce script

2019-03-29 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192846. akhuang marked an inline comment as done. akhuang added a comment. Tmpfile was not being removed CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/utils/creduce-clang-crash.py Index: cl

[PATCH] D59725: Additions to creduce script

2019-03-29 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 2 inline comments as done. akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:208 +print("\nTrying to preprocess the source file...") +# use delete=False in case the tmpfile flag causes problems when copying +with tempfile.Nam

[PATCH] D59725: Additions to creduce script

2019-03-29 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson accepted this revision. arichardson added a comment. This revision is now accepted and ready to land. LGTM once the tempfile is deleted. Comment at: clang/utils/creduce-clang-crash.py:208 +print("\nTrying to preprocess the source file...") +# use delete=Fals

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192669. akhuang marked 3 inline comments as done. akhuang added a comment. Add preprocessing with clang -E only; use `with` for opening files CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/ut

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:212 + +cmd = self.get_crash_cmd() + ['-E', '-P'] +try: arichardson wrote: > Some crash messages might include the line numbers, do you think it makes > sense to fall back to ru

[PATCH] D59725: Additions to creduce script

2019-03-28 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added a comment. In D59725#1443990 , @george.burgess.iv wrote: > Only a few more nits on my side, and this LGTM. WDYT, arichardson? LGTM with the minor tempfile changes. Comment at: clang/utils/creduce-clang-crash.py:201

[PATCH] D59725: Additions to creduce script

2019-03-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:198 +# Instead of modifying the filename in the test file, just run the command +fd, empty_file = tempfile.mkstemp() +if self.check_expected_output(filename=empty_file): geo

[PATCH] D59725: Additions to creduce script

2019-03-27 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192499. akhuang marked 3 inline comments as done. akhuang added a comment. change `mkstemp` to `NamedTemporaryFile` and add `decode(utf-8)` so it works on python3.5 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Only a few more nits on my side, and this LGTM. WDYT, arichardson? Comment at: clang/utils/creduce-clang-crash.py:137 + +# If no message was found, use the top five stack trace functions, +# ignoring some common functions -

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192350. akhuang marked 2 inline comments as done. akhuang added a comment. Herald added a subscriber: jdoerfert. added to error message regexes and command line flags CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 8 inline comments as done. akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:145 + matches = re.findall(stacktrace_re, crash_output) + result = filter(lambda x: x and x.strip() not in filters, matches)[:5] + for msg in res

[PATCH] D59725: Additions to creduce script

2019-03-26 Thread Alexander Richardson via Phabricator via cfe-commits
arichardson added inline comments. Comment at: clang/utils/creduce-clang-crash.py:145 + matches = re.findall(stacktrace_re, crash_output) + result = filter(lambda x: x and x.strip() not in filters, matches)[:5] + for msg in result: george.burgess.i

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192230. akhuang added a comment. fix issue with grouping two command line args together CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/utils/creduce-clang-crash.py Index: clang/utils/creduce

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
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 wro

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv marked an inline comment as done. george.burgess.iv 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 a

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192218. akhuang marked an inline comment as done. akhuang added a comment. Style nits, added comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/utils/creduce-clang-crash.py Index: clang

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I recently discovered NamedTemporaryFile, maybe that would help simplify up the various mkstemp usages. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 ___ cfe-commits mailing l

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang marked 15 inline comments as done. akhuang added inline comments. Comment at: clang/utils/creduce-clang-crash.py:137 + +# If no message was found, use the top five stack trace functions, +# ignoring some common functions george.burgess.iv wrote: >

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Thanks for this! Comment at: clang/utils/creduce-clang-crash.py:137 + +# If no message was found, use the top five stack trace functions, +# ignoring some common functions Please expand a bit on why 5 was chosen (is th

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192149. akhuang added a comment. reuploaded diff with full context CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/utils/creduce-clang-crash.py Index: clang/utils/creduce-clang-crash.py =

[PATCH] D59725: Additions to creduce script

2019-03-25 Thread Amy Huang via Phabricator via cfe-commits
akhuang updated this revision to Diff 192145. akhuang added a comment. Fix some typos, pass --tidy flag to creduce CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59725/new/ https://reviews.llvm.org/D59725 Files: clang/utils/creduce-clang-crash.py Index: clang/utils/creduce-clang-cras

[PATCH] D59725: Additions to creduce script

2019-03-22 Thread Amy Huang via Phabricator via cfe-commits
akhuang created this revision. akhuang added reviewers: rnk, george.burgess.iv, arichardson. Herald added a reviewer: serge-sans-paille. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some more additions to the script - mainly reducing the clang args after the creduce run