forked from OSchip/llvm-project
- 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:
parent
a0c0857e7a
commit
72cecf9a63
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue