summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [clang-tidy/ObjC] Update list of acronyms in PropertyDeclarationCheckBen Hamilton2018-09-071-0/+8
| | | | | | | | | | | | Summary: This adds a few common acronyms we found were missing from PropertyDeclarationCheck. Reviewers: Wizard, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D51819 llvm-svn: 341720
* [clang-tidy/ObjC] Add SQL to list of acronymsBen Hamilton2018-07-121-0/+1
| | | | | | | | | | | | | | Summary: SQL is a common acronym. Reviewers: Wizard, hokein Reviewed By: Wizard, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D49190 llvm-svn: 336919
* [clang-tidy/ObjC] Add hashing algorithm acronyms to objc-property-declarationBen Hamilton2018-06-271-0/+6
| | | | | | | | | | | | | | | | Summary: This PR adds a few acronyms related to hashing algorithms to the standard list in `objc-property-declaration`. Reviewers: Wizard Reviewed By: Wizard Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48652 llvm-svn: 335770
* - Add "AV" as new default acronym. - Add support for "I" and "A" in ↵Yan Zhang2018-06-111-1/+2
| | | | | | | | | | | | | | | | lowerCamelCase pattern Summary: Now we can support property names like "hasADog" correctly. Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D48039 llvm-svn: 334448
* [checks/property-decls] Fix comment in ↵Ben Hamilton2018-06-071-1/+1
| | | | | | | | | | | | | | | | | | clang-tidy/objc/PropertyDeclarationCheck.cpp ✍️ Summary: The comment incorrectly claims that the listed acronyms are all extracted from the linked Apple documentation. Reviewers: Wizard, benhamilton Reviewed By: Wizard, benhamilton Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46922 Contributed by @stephanemoore. llvm-svn: 334238
* add AR to acronyms of clang-tidy property checkYan Zhang2018-05-151-0/+1
| | | | | | | | | | | | Reviewers: hokein, benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D46895 llvm-svn: 332382
* Add support for ObjC property name to be a single acronym.Yan Zhang2018-05-041-0/+6
| | | | | | | | | | | | | | | | | | | | | Summary: This change will support cases like: ``` @property(assign, nonatomic) int ID; ``` Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D46374 llvm-svn: 331545
* [clang-tidy] Add Apple prefix acronyms to objc-property-declarationBen Hamilton2018-05-011-0/+8
| | | | | | | | | | | | | | | | | | | | | Summary: This adds a few common Apple first-party API prefixes as acronyms to `objc-property-declaration`. Here's a list showing where these come from: http://nshipster.com/namespacing/ Test Plan: New tests added. Ran tests with: % make -j16 check-clang-tools Reviewers: Wizard, hokein Subscribers: klimek, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D46206 llvm-svn: 331267
* add extra acronyms for objc property namesYan Zhang2018-04-181-0/+5
| | | | | | | | | | | | | | Summary: This is to support general acronyms in Objective-C like 2G/3G/4G/... and coordinates X, Y, Z and W. Reviewers: benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D45750 llvm-svn: 330286
* do not register matcher for objc-only checks when analyzing non-objc sources ↵Yan Zhang2018-03-071-0/+4
| | | | | | | | | | | | | | | | to save resources Summary: I did not put lang opt check in AvoidSpinlockCheck since OSSpinLock is not objc specific. We won't want to skip it when analyzing some C++ target used by other ObjC sources. Reviewers: hokein, benhamilton Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D44174 llvm-svn: 326928
* add UUID to the acronyms list of objc property name checksYan Zhang2018-02-271-0/+2
| | | | | | | | | | | | Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D43775 llvm-svn: 326222
* Support special acronyms inside property names and allow plural formsYan Zhang2018-02-061-7/+10
| | | | | | | | | | | | Reviewers: benhamilton, hokein Reviewed By: benhamilton, hokein Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42947 llvm-svn: 324407
* add prefix with '_' support for property name. Corresponding apple dev doc: ↵Yan Zhang2018-01-301-21/+78
| | | | | | | | | | | | | | https://developer.apple.com/library/content/qa/qa1908/_index.html Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42464 llvm-svn: 323722
* [clang-tidy objc-property-declaration] New option IncludeDefaultAcronymsBen Hamilton2018-01-221-66/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The existing option objc-property-declaration.Acronyms replaces the built-in set of acronyms. While this behavior is OK for clients that don't want the default behavior, many clients may just want to add their own custom acronyms to the default list. This revision introduces a new option, objc-property-declaration.IncludeDefaultAcronyms, which controls whether the acronyms in objc-property-declaration.Acronyms are appended to the default list (the default behavior) or whether they replace. I also updated the documentation. Test Plan: make -j12 check-clang-tools Reviewers: Wizard, hokein, klimek Reviewed By: hokein Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: https://reviews.llvm.org/D42261 llvm-svn: 323130
* [clang-tidy objc-property-declaration] Expand list of ObjC acronymsBen Hamilton2018-01-181-12/+50
| | | | | | | | | | | | | | | | | | | | | Summary: We were missing some pretty common acronyms in the camelCase property name check objc-property-declaration. This expands the list and sorts it lexicographically, so we can avoid duplicates. Test Plan: make -j12 check-clang-tools Reviewers: Wizard, hokein, klimek Reviewed By: Wizard Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42253 llvm-svn: 322886
* add ID as a special acronym to objc property declaration check for property ↵Yan Zhang2018-01-171-8/+11
| | | | | | | | | | | | | | names like bundleID.allow using acronyms as suffix. Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42143 llvm-svn: 322602
* add new check for property declarationBen Hamilton2017-11-131-0/+115
Summary: This check finds property declarations in Objective-C files that do not follow the pattern of property names in Apple's programming guide. The property name should be in the format of Lower Camel Case or with some particular acronyms as prefix. Example: @property(nonatomic, assign) int lowerCamelCase; @property(nonatomic, strong) NSString *URLString; Test plan: ninja check-clang-tools Reviewers: benhamilton, hokein Reviewed By: hokein Subscribers: cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D39829 llvm-svn: 318117
OpenPOWER on IntegriCloud