This is an archive of the discontinued LLVM Phabricator instance.

Replace re module by regex module in run-clang-tidy script
AbandonedPublic

Authored by sylvestre.ledru on Mar 4 2017, 6:22 AM.

Details

Reviewers
alexfh
Summary

Avoid limitation of 100 groups for regular expressions
Patch by Manuel Grizonnet

reported here:
https://github.com/llvm-mirror/clang-tools-extra/pull/9

Diff Detail

Event Timeline

sylvestre.ledru created this revision.Mar 4 2017, 6:22 AM
alexfh edited edge metadata.Mar 5 2017, 1:53 AM

https://docs.python.org/2/howto/regex.html#introduction says "The regex module was removed completely in Python 2.5.". Why would we want to switch to it?

alexfh requested changes to this revision.Mar 5 2017, 1:53 AM
This revision now requires changes to proceed.Mar 5 2017, 1:53 AM
alexfh added a comment.Mar 5 2017, 2:04 AM

Actually, I'm not sure why we need groups in that regex. We can instead try replacing re.compile('(' + ')|('.join(args.files) + ')') with re.compile('|'.join(args.files)).

sylvestre.ledru abandoned this revision.Apr 9 2017, 6:16 AM

done here: r298619