Author: wizard Date: Wed Apr 18 13:09:10 2018 New Revision: 330286 URL: http://llvm.org/viewvc/llvm-project?rev=330286&view=rev Log: add extra acronyms for objc property names
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 Modified: clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m Modified: clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp?rev=330286&r1=330285&r2=330286&view=diff ============================================================================== --- clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp (original) +++ clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp Wed Apr 18 13:09:10 2018 @@ -39,6 +39,7 @@ enum NamingStyle { /// /// Keep this list sorted. constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { + "[2-9]G", "ACL", "API", "ARGB", @@ -93,8 +94,12 @@ constexpr llvm::StringLiteral DefaultSpe "VOIP", "VPN", "VR", + "W", "WAN", + "X", "XML", + "Y", + "Z", }; /// For now we will only fix 'CamelCase' or 'abc_CamelCase' property to Modified: clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m?rev=330286&r1=330285&r2=330286&view=diff ============================================================================== --- clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m (original) +++ clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m Wed Apr 18 13:09:10 2018 @@ -17,6 +17,8 @@ @property(strong, nonatomic) NSString *supportURLsCamelCase; @property(strong, nonatomic) NSString *supportURLCamelCase; @property(strong, nonatomic) NSString *VCsPluralToAdd; +@property(assign, nonatomic) int centerX; +@property(assign, nonatomic) int enable2GBackgroundFetch; @end @interface Foo (Bar) _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits