[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341061: [clang-tidy] Use simple string matching instead of Regex (authored by omtcyfz, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D51360?v

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163309. kbobyrev marked an inline comment as done. kbobyrev added a comment. Mention that the code actually performs `absl/(any|absl|library)` substring match. https://reviews.llvm.org/D51360 Files: clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. In https://reviews.llvm.org/D51360#1219024, @kbobyrev wrote: > Ah, correct. I totally forgot about the `^string$` for the exact match. > > This should not change behavior now. I believe what yo

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-30 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 163302. kbobyrev marked an inline comment as done. kbobyrev added a comment. Ah, correct. I totally forgot about the `^string$` for the exact match. This should not change behavior now. I believe what you propose would make the code easier (there'd only be

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-29 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks very much for improving it! Comment at: clang-tools-extra/clang-tidy/abseil/AbseilMatcher.h:45 - llvm::Regex RE( - "absl/(algorithm|base|container|debugging|memory|meta|numeric|strings|" - "synchronization|time|types|utility)"); ---

[PATCH] D51360: [clang-tidy] Use simple string matching instead of Regex

2018-08-28 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: hokein. kbobyrev added a project: clang-tools-extra. Herald added a subscriber: xazax.hun. Instead of parsing and compiling the `llvm::Regex` each time, it's faster to use basic string matching for filename prefix check. https://reviews