[PATCH] D46374: Add support for ObjC property name to be a single acronym.
Ben Hamilton via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 3 08:16:03 PDT 2018
benhamilton requested changes to this revision.
benhamilton added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:222
+ [MatchedDecl](std::string const &s) {
+ return s == MatchedDecl->getName();
+ })) {
----------------
`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?
================
Comment at: test/clang-tidy/objc-property-declaration.m:24
@property(assign, nonatomic) int enableGLAcceleration;
+ at property(assign, nonatomic) int ID;
@end
----------------
Please add a test for a built-in regex (4G) as well as a custom regex in the other test file.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D46374
More information about the cfe-commits
mailing list