[PATCH] D45392: [clang-tidy] add new check to find out objc ivars which do not have prefix '_'

Yan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 9 11:07:22 PDT 2018


Wizard added a comment.

In https://reviews.llvm.org/D45392#1061433, @alexfh wrote:

> I wonder whether the readability-identifier-naming check could be extended to support this use case instead of adding a new check specifically for underscores in ivar names?


Hmm readability-identifier-naming is a C++ check but this one is only for ObjC. I prefer putting them in separate places unless they work for both languages.
Moreover, readability-identifier-naming always runs all matchers and apply the same checks on all identifiers. We have to change at least part of the structure to make it applicable for this check. And readability-identifier-naming is not in google default clang-tidy check list yet. We will even need more work to import it.
So I think creating a new simple ObjC-specific check is a better way here.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D45392





More information about the cfe-commits mailing list