Index: lib/Sema/SemaExprObjC.cpp =================================================================== --- lib/Sema/SemaExprObjC.cpp +++ lib/Sema/SemaExprObjC.cpp @@ -2000,10 +2000,16 @@ } // Look for the matching setter, in case it is needed. - Selector SetterSel = - SelectorTable::constructSetterSelector(PP.getIdentifierTable(), - PP.getSelectorTable(), - &propertyName); + Selector SetterSel; + if (ObjCPropertyDecl *PD = IFace->FindPropertyDeclaration( + &propertyName, ObjCPropertyQueryKind::OBJC_PR_query_class)) { + SetterSel = PD->getSetterName(); + } else { + SetterSel = + SelectorTable::constructSetterSelector(PP.getIdentifierTable(), + PP.getSelectorTable(), + &propertyName); + } ObjCMethodDecl *Setter = IFace->lookupClassMethod(SetterSel); if (!Setter) {