[PATCH] D45750: add extra acronyms for objc property names

Yan Zhang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 18 13:12:32 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL330286: add extra acronyms for objc property names (authored by Wizard, committed by ).
Herald added a subscriber: llvm-commits.

Repository:
  rL LLVM

https://reviews.llvm.org/D45750

Files:
  clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
  clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m


Index: clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
===================================================================
--- clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
+++ clang-tools-extra/trunk/clang-tidy/objc/PropertyDeclarationCheck.cpp
@@ -39,6 +39,7 @@
 ///
 /// Keep this list sorted.
 constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = {
+    "[2-9]G",
     "ACL",
     "API",
     "ARGB",
@@ -93,8 +94,12 @@
     "VOIP",
     "VPN",
     "VR",
+    "W",
     "WAN",
+    "X",
     "XML",
+    "Y",
+    "Z",
 };
 
 /// For now we will only fix 'CamelCase' or 'abc_CamelCase' property to
Index: clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m
===================================================================
--- clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m
+++ clang-tools-extra/trunk/test/clang-tidy/objc-property-declaration.m
@@ -17,6 +17,8 @@
 @property(strong, nonatomic) NSString *supportURLsCamelCase;
 @property(strong, nonatomic) NSString *supportURLCamelCase;
 @property(strong, nonatomic) NSString *VCsPluralToAdd;
+ at property(assign, nonatomic) int centerX;
+ at property(assign, nonatomic) int enable2GBackgroundFetch;
 @end
 
 @interface Foo (Bar)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45750.142987.patch
Type: text/x-patch
Size: 1267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180418/df6561b9/attachment.bin>


More information about the cfe-commits mailing list