for (llvm::SmallVector<ValueDecl*,8>::iterator I = BlockByCopyDecls.begin(),
E = BlockByCopyDecls.end(); I != E; ++I) {
S += " ";
- std::string Name = (*I)->getNameAsString();
// Handle nested closure invocation. For example:
//
// void (^myImportedClosure)(void);
S += "__cself->" + (*I)->getNameAsString() + "; // bound by copy\n";
}
else {
+ std::string Name = (*I)->getNameAsString();
(*I)->getType().getAsStringInternal(Name, Context->PrintingPolicy);
S += Name + " = __cself->" +
(*I)->getNameAsString() + "; // bound by copy\n";
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7638400
+// FIXME. Arrange this test's rewritten source to compile with clang
@interface X
@end
@end
// CHECK-LP: static void enumerateIt(void (*)(id, id, char *));
+
+// radar 7651312
+void apply(void (^block)(int));
+
+static void x(int (^cmp)(int, int)) {
+ x(cmp);
+}
+
+static void y(int (^cmp)(int, int)) {
+ apply(^(int sect) {
+ x(cmp);
+ });
+}