case CPointerTy:
return argTy->isPointerType() || argTy->isObjCObjectPointerType() ||
- argTy->isNullPtrType();
+ argTy->isBlockPointerType() || argTy->isNullPtrType();
case ObjCPointerTy: {
if (argTy->getAs<ObjCObjectPointerType>() ||
-// RUN: %clang_cc1 -triple x86_64-apple-darwin -Wformat-nonliteral -fsyntax-only -verify %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -Wformat-nonliteral -fsyntax-only -fblocks -verify %s
//===----------------------------------------------------------------------===//
// The following code is reduced using delta-debugging from
}
@end
+
+
+// Test that it is okay to use %p with the address of a block.
+void rdar11049844_aux();
+int rdar11049844() {
+ typedef void (^MyBlock)(void);
+ MyBlock x = ^void() { rdar11049844_aux(); };
+ printf("%p", x); // no-warning
+}
+