diff options
Diffstat (limited to 'lib/Sema/SemaPseudoObject.cpp')
-rw-r--r-- | lib/Sema/SemaPseudoObject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaPseudoObject.cpp b/lib/Sema/SemaPseudoObject.cpp index bf3b82bb8e..57706759f3 100644 --- a/lib/Sema/SemaPseudoObject.cpp +++ b/lib/Sema/SemaPseudoObject.cpp @@ -32,6 +32,7 @@ #include "clang/Sema/SemaInternal.h" #include "clang/AST/ExprObjC.h" +#include "clang/Basic/CharInfo.h" #include "clang/Lex/Preprocessor.h" #include "clang/Sema/Initialization.h" #include "clang/Sema/ScopeInfo.h" @@ -562,8 +563,9 @@ bool ObjCPropertyOpBuilder::findSetter(bool warn) { if (const ObjCInterfaceDecl *IFace = dyn_cast<ObjCInterfaceDecl>(setter->getDeclContext())) { const StringRef thisPropertyName(prop->getName()); + // Try flipping the case of the first character. char front = thisPropertyName.front(); - front = islower(front) ? toupper(front) : tolower(front); + front = isLowercase(front) ? toUppercase(front) : toLowercase(front); SmallString<100> PropertyName = thisPropertyName; PropertyName[0] = front; IdentifierInfo *AltMember = &S.PP.getIdentifierTable().get(PropertyName); |