benhamilton created this revision. benhamilton added reviewers: Wizard, hokein. Herald added subscribers: cfe-commits, xazax.hun, klimek.
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 Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D46206 Files: clang-tidy/objc/PropertyDeclarationCheck.cpp test/clang-tidy/objc-property-declaration.m Index: test/clang-tidy/objc-property-declaration.m =================================================================== --- test/clang-tidy/objc-property-declaration.m +++ 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) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp =================================================================== --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ clang-tidy/objc/PropertyDeclarationCheck.cpp @@ -45,11 +45,17 @@ "ARGB", "ASCII", "BGRA", + "CA", + "CF", + "CG", + "CI", + "CV", "CMYK", "DNS", "FPS", "FTP", "GIF", + "GL", "GPS", "GUID", "HD", @@ -65,6 +71,7 @@ "LZW", "MDNS", "MIDI", + "NS", "OS", "PDF", "PIN", @@ -81,6 +88,7 @@ "RPC", "RTF", "RTL", + "SC", "SDK", "SSO", "TCP",
Index: test/clang-tidy/objc-property-declaration.m =================================================================== --- test/clang-tidy/objc-property-declaration.m +++ 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) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp =================================================================== --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ clang-tidy/objc/PropertyDeclarationCheck.cpp @@ -45,11 +45,17 @@ "ARGB", "ASCII", "BGRA", + "CA", + "CF", + "CG", + "CI", + "CV", "CMYK", "DNS", "FPS", "FTP", "GIF", + "GL", "GPS", "GUID", "HD", @@ -65,6 +71,7 @@ "LZW", "MDNS", "MIDI", + "NS", "OS", "PDF", "PIN", @@ -81,6 +88,7 @@ "RPC", "RTF", "RTL", + "SC", "SDK", "SSO", "TCP",
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits