mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-27 23:51:56 +00:00
Fixes a rewrting bug of a property-dot syntax expression inside
a block. First part of // rdar://9254348 llvm-svn: 129171
This commit is contained in:
parent
778947c203
commit
eae9c0e3df
@ -5558,6 +5558,7 @@ Stmt *RewriteObjC::RewriteFunctionBodyOrGlobalInitializer(Stmt *S) {
|
||||
// Rewrite the block body in place.
|
||||
Stmt *SaveCurrentBody = CurrentBody;
|
||||
CurrentBody = BE->getBody();
|
||||
CollectPropertySetters(CurrentBody);
|
||||
PropParentMap = 0;
|
||||
RewriteFunctionBodyOrGlobalInitializer(BE->getBody());
|
||||
CurrentBody = SaveCurrentBody;
|
||||
|
27
clang/test/Rewriter/rewrite-block-literal-1.mm
Normal file
27
clang/test/Rewriter/rewrite-block-literal-1.mm
Normal file
@ -0,0 +1,27 @@
|
||||
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw.cpp
|
||||
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
|
||||
// radar 9254348
|
||||
|
||||
void *sel_registerName(const char *);
|
||||
typedef void (^BLOCK_TYPE)(void);
|
||||
|
||||
@interface CoreDAVTaskGroup
|
||||
{
|
||||
int IVAR;
|
||||
}
|
||||
@property int IVAR;
|
||||
- (void) setCompletionBlock : (BLOCK_TYPE) arg;
|
||||
@end
|
||||
|
||||
@implementation CoreDAVTaskGroup
|
||||
- (void)_finishInitialSync {
|
||||
CoreDAVTaskGroup *folderPost;
|
||||
[folderPost setCompletionBlock : (^{
|
||||
self.IVAR = 0;
|
||||
})];
|
||||
}
|
||||
@dynamic IVAR;
|
||||
- (void) setCompletionBlock : (BLOCK_TYPE) arg {}
|
||||
@end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user