[cfe-commits] r98070 - in /cfe/trunk: lib/AST/Type.cpp test/SemaObjC/blocks.m
Fariborz Jahanian
fjahanian at apple.com
Tue Mar 9 10:34:52 PST 2010
Author: fjahanian
Date: Tue Mar 9 12:34:52 2010
New Revision: 98070
URL: http://llvm.org/viewvc/llvm-project?rev=98070&view=rev
Log:
Don't error when a block pointer is passed to a
vararg functions/methods. Fixes radar 7725203.
Modified:
cfe/trunk/lib/AST/Type.cpp
cfe/trunk/test/SemaObjC/blocks.m
Modified: cfe/trunk/lib/AST/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Type.cpp?rev=98070&r1=98069&r2=98070&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Type.cpp (original)
+++ cfe/trunk/lib/AST/Type.cpp Tue Mar 9 12:34:52 2010
@@ -650,6 +650,7 @@
case Vector:
case ExtVector:
case ObjCObjectPointer:
+ case BlockPointer:
return true;
case Enum:
Modified: cfe/trunk/test/SemaObjC/blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/blocks.m?rev=98070&r1=98069&r2=98070&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/blocks.m (original)
+++ cfe/trunk/test/SemaObjC/blocks.m Tue Mar 9 12:34:52 2010
@@ -55,3 +55,15 @@
}
}
+
+// rdar 7725203
+ at class NSString;
+
+extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2)));
+
+void foo10() {
+ void(^myBlock)(void) = ^{
+ };
+ NSLog(@"%@", myBlock);
+}
+
More information about the cfe-commits
mailing list