- Add "AV" as new default acronym. - Add support for "I" and "A" in lowerCamelCase pattern

Summary: Now we can support property names like "hasADog" correctly.

Reviewers: benhamilton, hokein

Reviewed By: benhamilton

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D48039

llvm-svn: 334448
This commit is contained in:
Yan Zhang 2018-06-11 22:44:06 +00:00
parent a0c0857e7a
commit 72cecf9a63
2 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,7 @@ constexpr llvm::StringLiteral DefaultSpecialAcronyms[] = {
"AR",
"ARGB",
"ASCII",
"AV",
"BGRA",
"CA",
"CF",
@ -153,7 +154,7 @@ std::string validPropertyNameRegex(llvm::ArrayRef<std::string> EscapedAcronyms,
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) {

View File

@ -22,6 +22,7 @@
@property(assign, nonatomic) int shouldUseCFPreferences;
@property(assign, nonatomic) int enableGLAcceleration;
@property(assign, nonatomic) int ID;
@property(assign, nonatomic) int hasADog;
@end
@interface Foo (Bar)