File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1102
1102
9012911C1048068D0083456D /* ASTUnit.cpp */,
1103
1103
1A2A54A50FD1DD1C00F4CE45 /* ASTConsumers.cpp */,
1104
1104
1A2A54A70FD1DD1C00F4CE45 /* CacheTokens.cpp */,
1105
+ DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */,
1105
1106
1ACB57DB1105820D0047B991 /* CompilerInstance.cpp */,
1106
1107
1ACB57DC1105820D0047B991 /* CompilerInvocation.cpp */,
1107
1108
1ACB57DD1105820D0047B991 /* DeclXML.cpp */,
2006
2007
72D16C1E0D9975C400E6DA4A /* HTMLRewrite.cpp */,
2007
2008
DEF7D9F80C9C8B1D0001F598 /* Rewriter.cpp */,
2008
2009
DECAB0CF0DB3C84200E13CCB /* RewriteRope.cpp */,
2009
- DE4DC7A20EA1C33E00069E5A /* TokenRewriter.cpp */,
2010
2010
);
2011
2011
name = Rewrite;
2012
2012
sourceTree = "<group>";
Original file line number Diff line number Diff line change @@ -5363,6 +5363,15 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
5363
5363
newStmt = RewriteFunctionBodyOrGlobalInitializer (S);
5364
5364
if (newStmt)
5365
5365
*CI = newStmt;
5366
+ // If dealing with an assignment with LHS being a property reference
5367
+ // expression, the entire assignment tree is rewritten into a property
5368
+ // setter messaging. This involvs the RHS too. Do not attempt to rewrite
5369
+ // RHS again.
5370
+ if (ObjCPropertyRefExpr *PRE = dyn_cast<ObjCPropertyRefExpr>(S))
5371
+ if (PropSetters[PRE]) {
5372
+ ++CI;
5373
+ continue ;
5374
+ }
5366
5375
}
5367
5376
5368
5377
if (BlockExpr *BE = dyn_cast<BlockExpr>(S)) {
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
2
+ // RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
3
+ // rdar:// 8527018
4
+
5
+ void *sel_registerName (const char *);
6
+
7
+ @class NSString ;
8
+ @interface CoreDAVDiscoveryAccountInfo {
9
+ NSString *_scheme;
10
+ }
11
+ @property (retain ) NSString *scheme;
12
+ - (void ) Meth ;
13
+ @end
14
+
15
+ @implementation CoreDAVDiscoveryAccountInfo
16
+ @synthesize scheme=_scheme;
17
+ - (void ) Meth {
18
+ CoreDAVDiscoveryAccountInfo *discoveryInfo;
19
+ discoveryInfo.scheme = @" https" ;
20
+ }
21
+ @end
You can’t perform that action at this time.
0 commit comments