diff options
Diffstat (limited to 'test/SemaObjC/arc.m')
-rw-r--r-- | test/SemaObjC/arc.m | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/SemaObjC/arc.m b/test/SemaObjC/arc.m index 060af24fa0d9..ba7c09f4f9d7 100644 --- a/test/SemaObjC/arc.m +++ b/test/SemaObjC/arc.m @@ -285,7 +285,7 @@ void test11(id op, void *vp) { b = (nil == vp); b = (vp == op); // expected-error {{implicit conversion of Objective-C pointer type 'id' to C pointer type 'void *' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRetain call}} - b = (op == vp); // expected-error {{implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast}} expected-note {{use __bridge}} expected-note {{use CFBridgingRelease call}} + b = (op == vp); } void test12(id collection) { @@ -782,3 +782,19 @@ void foo(NSArray *array) { } } } + +// rdar://16627903 +extern void abort(); +#define TKAssertEqual(a, b) do{\ + __typeof(a) a_res = (a);\ + __typeof(b) b_res = (b);\ + if ((a_res) != (b_res)) {\ + abort();\ + }\ +}while(0) + +int garf() { + id object; + TKAssertEqual(object, nil); + TKAssertEqual(object, (id)nil); +} |