definition comes after where it is needed. Fixes radar
7589385.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@94788
91177308-0d34-0410-b5e6-
96231b3b80d8
void RewriteObjC::InsertBlockLiteralsWithinMethod(ObjCMethodDecl *MD) {
//fprintf(stderr,"In InsertBlockLiteralsWitinMethod\n");
//SourceLocation FunLocStart = MD->getLocStart();
- // FIXME: This hack works around a bug in Rewrite.InsertText().
- SourceLocation FunLocStart = MD->getLocStart().getFileLocWithOffset(-1);
+ SourceLocation FunLocStart = MD->getLocStart();
std::string FuncName = MD->getSelector().getAsString();
// Convert colons to underscores.
std::string::size_type loc = 0;
id list;
}
- (void) Meth;
+// radar 7589385 use before definition
+- (void) allObjects;
@end
@implementation I
+// radar 7589385 use before definition
+- (void) allObjects {
+ __attribute__((__blocks__(byref))) id *listp;
+
+ ^(void) {
+ *listp++ = 0;
+ };
+}
- (void) Meth { __attribute__((__blocks__(byref))) void ** listp = (void **)list; }
@end