doesn't duplicate, but they all surface as implicit
properties. It's also a useful optimization to not
duplicate the implicit getter lookup. So, trust the
getter lookup that was already done in these cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144031
91177308-0d34-0410-b5e6-
96231b3b80d8
bool ObjCPropertyOpBuilder::findGetter() {
if (Getter) return true;
- Getter = LookupMethodInReceiverType(S, RefExpr->getGetterSelector(), RefExpr);
+ // For implicit properties, just trust the lookup we already did.
+ if (RefExpr->isImplicitProperty()) {
+ Getter = RefExpr->getImplicitPropertyGetter();
+ return (Getter != 0);
+ }
+
+ ObjCPropertyDecl *prop = RefExpr->getExplicitProperty();
+ Getter = LookupMethodInReceiverType(S, prop->getGetterName(), RefExpr);
return (Getter != 0);
}
// rdar://10127639
@synthesize window; // expected-error {{missing context for property implementation declaration}}
+
+// rdar://10408414
+Class test6_getClass();
+@interface Test6
+@end
+@implementation Test6
++ (float) globalValue { return 5.0f; }
++ (float) gv { return test6_getClass().globalValue; }
+@end