[PATCH] D48039: - Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern
Yan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 11 15:50:29 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL334448: - Add "AV" as new default acronym. - Add support for "I" and "A" in… (authored by Wizard, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D48039
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
@@ -45,6 +45,7 @@
"AR",
"ARGB",
"ASCII",
+ "AV",
"BGRA",
"CA",
"CF",
@@ -153,7 +154,7 @@
std::string StartMatcher = UsedInMatcher ? "::" : "^";
std::string AcronymsMatcher = AcronymsGroupRegex(EscapedAcronyms);
return StartMatcher + "(" + AcronymsMatcher + "[A-Z]?)?[a-z]+[a-z0-9]*(" +
- AcronymsMatcher + "|([A-Z][a-z0-9]+))*$";
+ AcronymsMatcher + "|([A-Z][a-z0-9]+)|A|I)*$";
}
bool hasCategoryPropertyPrefix(llvm::StringRef PropertyName) {
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
@@ -22,6 +22,7 @@
@property(assign, nonatomic) int shouldUseCFPreferences;
@property(assign, nonatomic) int enableGLAcceleration;
@property(assign, nonatomic) int ID;
+ at property(assign, nonatomic) int hasADog;
@end
@interface Foo (Bar)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48039.150865.patch
Type: text/x-patch
Size: 1325 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180611/ba1795d6/attachment.bin>
More information about the llvm-commits
mailing list