File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -5479,6 +5479,12 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
5479
5479
// ^(NSURL *errorURL, NSError *error) { return (BOOL)1; };
5480
5480
SourceRange SrcRange = BinOp->getSourceRange ();
5481
5481
Stmt *newStmt = RewriteFunctionBodyOrGlobalInitializer (BinOp->getRHS ());
5482
+ // Need to rewrite the ivar access expression if need be.
5483
+ if (isa<ObjCIvarRefExpr>(newStmt)) {
5484
+ bool replaced = false ;
5485
+ newStmt = RewriteObjCNestedIvarRefExpr (newStmt, replaced);
5486
+ }
5487
+
5482
5488
DisableReplaceStmt = false ;
5483
5489
//
5484
5490
// Unlike the main iterator, we explicily avoid changing 'BinOp'. If
Original file line number Diff line number Diff line change @@ -26,3 +26,21 @@ - (void)METHOD {
26
26
}
27
27
@end
28
28
29
+ // rdar: // 8541517
30
+ @interface A { }
31
+ @property (retain ) NSString *scheme;
32
+ @end
33
+
34
+ @interface B : A {
35
+ NSString * _schemeName;
36
+ }
37
+ @end
38
+
39
+
40
+ @implementation B
41
+ -(void ) test {
42
+ B *b;
43
+ b.scheme = _schemeName; // error because of this line
44
+ }
45
+ @end
46
+
You can’t perform that action at this time.
0 commit comments