diff options
author | Ben Hamilton <benhamilton@google.com> | 2018-05-01 14:48:51 +0000 |
---|---|---|
committer | Ben Hamilton <benhamilton@google.com> | 2018-05-01 14:48:51 +0000 |
commit | d4fb951ce35315e1a3f5d760195fe23974c5e31f (patch) | |
tree | ce88bfe07465151e7f3d44343bc16da9d5c40c6f | |
parent | eec5ba9faea38b911cdd8aaf48cde1bd2e194be4 (diff) | |
download | bcm5719-llvm-d4fb951ce35315e1a3f5d760195fe23974c5e31f.tar.gz bcm5719-llvm-d4fb951ce35315e1a3f5d760195fe23974c5e31f.zip |
[clang-tidy] Add Apple prefix acronyms to objc-property-declaration
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
-rw-r--r-- | clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp | 8 | ||||
-rw-r--r-- | clang-tools-extra/test/clang-tidy/objc-property-declaration.m | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp index ae9ca013e82..fd15df9dea1 100644 --- a/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp +++ b/clang-tools-extra/clang-tidy/objc/PropertyDeclarationCheck.cpp @@ -45,11 +45,17 @@ constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { "ARGB", "ASCII", "BGRA", + "CA", + "CF", + "CG", + "CI", + "CV", "CMYK", "DNS", "FPS", "FTP", "GIF", + "GL", "GPS", "GUID", "HD", @@ -65,6 +71,7 @@ constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { "LZW", "MDNS", "MIDI", + "NS", "OS", "PDF", "PIN", @@ -81,6 +88,7 @@ constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { "RPC", "RTF", "RTL", + "SC", "SDK", "SSO", "TCP", diff --git a/clang-tools-extra/test/clang-tidy/objc-property-declaration.m b/clang-tools-extra/test/clang-tidy/objc-property-declaration.m index 5e5280877f0..3f001a84316 100644 --- a/clang-tools-extra/test/clang-tidy/objc-property-declaration.m +++ b/clang-tools-extra/test/clang-tidy/objc-property-declaration.m @@ -19,6 +19,8 @@ @property(strong, nonatomic) NSString *VCsPluralToAdd; @property(assign, nonatomic) int centerX; @property(assign, nonatomic) int enable2GBackgroundFetch; +@property(assign, nonatomic) int shouldUseCFPreferences; +@property(assign, nonatomic) int enableGLAcceleration; @end @interface Foo (Bar) |