[PATCH] D46374: Add support for ObjC property name to be a single acronym.
Yan Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri May 4 11:15:23 PDT 2018
Wizard marked an inline comment as done.
Wizard added inline comments.
================
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222
+ [MatchedDecl](std::string const &s) {
+ auto Acronym = llvm::Regex("^" + s + "$");
+ return Acronym.match(MatchedDecl->getName());
----------------
benhamilton wrote:
> Please be aware this will change the match from running a single regular expression to running ~ 70 regular expressions on every single `@property`. I would expect this to perform pretty poorly.
>
This is a good point. If using matching instead of equality check, I should not use any_of then. Updated it to use AcronymsGroupRegex().
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46374
More information about the cfe-commits
mailing list