File tree 2 files changed +17
-0
lines changed 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -2500,6 +2500,9 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) {
2500
2500
// A user declared getter will be synthesize when @synthesize of
2501
2501
// the property with the same name is seen in the @implementation
2502
2502
GetterMethod->setPropertyAccessor (true );
2503
+
2504
+ GetterMethod->createImplicitParams (Context,
2505
+ GetterMethod->getClassInterface ());
2503
2506
property->setGetterMethodDecl (GetterMethod);
2504
2507
2505
2508
// Skip setter if property is read-only.
@@ -2574,6 +2577,9 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property) {
2574
2577
// A user declared setter will be synthesize when @synthesize of
2575
2578
// the property with the same name is seen in the @implementation
2576
2579
SetterMethod->setPropertyAccessor (true );
2580
+
2581
+ SetterMethod->createImplicitParams (Context,
2582
+ SetterMethod->getClassInterface ());
2577
2583
property->setSetterMethodDecl (SetterMethod);
2578
2584
}
2579
2585
// Add any synthesized methods to the global pool. This allows us to
Original file line number Diff line number Diff line change @@ -190,3 +190,14 @@ int useRoot(Root *r) {
190
190
// CHECK: %{{[^ ]*}} = call i32 bitcast {{.*}} @"\01-[Root intProperty2]"
191
191
return [r getInt ] + [r intProperty ] + [r intProperty2 ];
192
192
}
193
+
194
+ __attribute__ ((objc_root_class))
195
+ @interface RootDeclOnly
196
+ @property(direct, readonly) int intProperty;
197
+ @end
198
+
199
+ int useRootDeclOnly (RootDeclOnly *r) {
200
+ // CHECK-LABEL: define i32 @useRootDeclOnly
201
+ // CHECK: %{{[^ ]*}} = call i32 bitcast {{.*}} @"\01-[RootDeclOnly intProperty]"
202
+ return [r intProperty ];
203
+ }
You can’t perform that action at this time.
0 commit comments