Stop moving attributes off of a block literal's decl specifiers.
These usually apply to the return type. At one point this was necessary to
get some of them to apply to the entire block, but it appears that's working
anyway (see block-return.c).
rdar://problem/20468034
llvm-svn: 240189
diff --git a/clang/test/SemaObjC/nullability.m b/clang/test/SemaObjC/nullability.m
index 2cbdba1..ca8c2fc 100644
--- a/clang/test/SemaObjC/nullability.m
+++ b/clang/test/SemaObjC/nullability.m
@@ -222,3 +222,11 @@
   ip = foo.d; // expected-warning{{from 'MultiProp * __nullable'}}
   ip = foo.e; // expected-error{{incompatible type 'MultiProp *(^ __nullable)(int)'}}
 }
+
+void testBlockLiterals() {
+  (void)(^id(void) { return 0; });
+  (void)(^id __nullable (void) { return 0; });
+  (void)(^ __nullable id(void) { return 0; });
+
+  int *x = (^ __nullable id(void) { return 0; })(); // expected-warning{{incompatible pointer types initializing 'int *' with an expression of type 'id __nullable'}}
+}