[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
Thu May 3 13:48:36 PDT 2018


Wizard added inline comments.


================
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222
+                  [MatchedDecl](std::string const &s) {
+                    return s == MatchedDecl->getName();
+                  })) {
----------------
benhamilton wrote:
> `s` is a regular expression here, so you need to match it using `llvm::Regex`, not `==`.
> 
> Why not just update `validPropertyNameRegex()` to handle this case?
> 
I would rather not to make the regex more complex as long as the change is simple and does bring extra cost. If update the regex it will be something like '(originalregex | acronyms)', which seems too much to me.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D46374





More information about the cfe-commits mailing list