[PATCH] D45750: add extra acronyms for objc property names
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; +@property(assign, nonatomic) int centerX; +@property(assign, nonatomic) int enable2GBackgroundFetch; @end @interface Foo (Bar) 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; +@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
[PATCH] D45750: add extra acronyms for objc property names
Wizard added inline comments. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:42 constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { +"[2-9]G", "ACL", benhamilton wrote: > Probably should just make this: > > "\\d+G" > It seems llvm::Regex does not recognize \d somehow. I tried \\d+ does not work for the test. Will keep [2-9]G for now. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D45750: add extra acronyms for objc property names
Wizard updated this revision to Diff 142985. Wizard marked 2 inline comments as done. Wizard added a comment. resolve comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 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 @@ -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) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp === --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ 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: test/clang-tidy/objc-property-declaration.m === --- test/clang-tidy/objc-property-declaration.m +++ 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; +@property(assign, nonatomic) int centerX; +@property(assign, nonatomic) int enable2GBackgroundFetch; @end @interface Foo (Bar) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp === --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ 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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D45750: add extra acronyms for objc property names
benhamilton accepted this revision. benhamilton added inline comments. This revision is now accepted and ready to land. Comment at: clang-tidy/objc/PropertyDeclarationCheck.cpp:42 constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = { +"[2-9]G", "ACL", Probably should just make this: "\\d+G" Comment at: test/clang-tidy/objc-property-declaration.m:21 +@property(assign, nonatomic) int centerX; +@property(assign, nonatomic) int enbale2GBackgroundFetch; @end enbale -> enable Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[PATCH] D45750: add extra acronyms for objc property names
Wizard created this revision. Herald added subscribers: cfe-commits, klimek. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45750 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 @@ -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 enbale2GBackgroundFetch; @end @interface Foo (Bar) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp === --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ 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: test/clang-tidy/objc-property-declaration.m === --- test/clang-tidy/objc-property-declaration.m +++ 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; +@property(assign, nonatomic) int centerX; +@property(assign, nonatomic) int enbale2GBackgroundFetch; @end @interface Foo (Bar) Index: clang-tidy/objc/PropertyDeclarationCheck.cpp === --- clang-tidy/objc/PropertyDeclarationCheck.cpp +++ 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 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits