]> granicus.if.org Git - clang/commitdiff
Don't error when a block pointer is passed to a
authorFariborz Jahanian <fjahanian@apple.com>
Tue, 9 Mar 2010 18:34:52 +0000 (18:34 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Tue, 9 Mar 2010 18:34:52 +0000 (18:34 +0000)
vararg functions/methods. Fixes radar 7725203.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98070 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Type.cpp
test/SemaObjC/blocks.m

index 76cc382920641af24720bf384dae196ddd743451..8a64f8ea97ec8fcfa87ef46ba43cf3674992e066 100644 (file)
@@ -650,6 +650,7 @@ bool Type::isPODType() const {
   case Vector:
   case ExtVector:
   case ObjCObjectPointer:
+  case BlockPointer:
     return true;
 
   case Enum:
index 36292309732b7e9b562acb705174acbee1a0f972..ddac7d1759ec84ba26ab47bc0fe997b61c807835 100644 (file)
@@ -55,3 +55,15 @@ int foo9() {
         }
 
 }
+
+// rdar 7725203
+@class NSString;
+
+extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));
+
+void foo10() {
+    void(^myBlock)(void) = ^{
+    };
+    NSLog(@"%@", myBlock);
+}
+