From c4813e8d02a06a01d4cad70f2feda564f7347676 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Tue, 9 Mar 2010 18:34:52 +0000 Subject: [PATCH] Don't error when a block pointer is passed to a vararg functions/methods. Fixes radar 7725203. llvm-svn: 98070 --- clang/lib/AST/Type.cpp | 1 + clang/test/SemaObjC/blocks.m | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/clang/lib/AST/Type.cpp b/clang/lib/AST/Type.cpp index 76cc38292064..8a64f8ea97ec 100644 --- a/clang/lib/AST/Type.cpp +++ b/clang/lib/AST/Type.cpp @@ -650,6 +650,7 @@ bool Type::isPODType() const { case Vector: case ExtVector: case ObjCObjectPointer: + case BlockPointer: return true; case Enum: diff --git a/clang/test/SemaObjC/blocks.m b/clang/test/SemaObjC/blocks.m index 36292309732b..ddac7d1759ec 100644 --- a/clang/test/SemaObjC/blocks.m +++ b/clang/test/SemaObjC/blocks.m @@ -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); +} +