Only print _Bool as 'bool' when 'bool' is defined as an object-like
macro whose only replacement token is '_Bool'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140656 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/blocks.m b/test/SemaObjC/blocks.m
index 187f7d8..2d77a20 100644
--- a/test/SemaObjC/blocks.m
+++ b/test/SemaObjC/blocks.m
@@ -23,9 +23,13 @@
return bar4(objectCreationBlock);
}
-void bar5(id(^)(void)); // expected-note{{passing argument to parameter here}}
+void bar5(id(^)(void)); // expected-note 3{{passing argument to parameter here}}
void foo5(id (^objectCreationBlock)(bool)) {
- return bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(bool)' to parameter of type 'id (^)(void)'}}
+ bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(bool)' to parameter of type 'id (^)(void)'}}
+#undef bool
+ bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(_Bool)' to parameter of type 'id (^)(void)'}}
+#define bool int
+ bar5(objectCreationBlock); // expected-error {{incompatible block pointer types passing 'id (^)(_Bool)' to parameter of type 'id (^)(void)'}}
}
void bar6(id(^)(int));