summaryrefslogtreecommitdiff
path: root/test/SemaObjC/id.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/id.m')
-rw-r--r--test/SemaObjC/id.m12
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaObjC/id.m b/test/SemaObjC/id.m
index 27b84dedf8e66..ced406ebd29b8 100644
--- a/test/SemaObjC/id.m
+++ b/test/SemaObjC/id.m
@@ -16,6 +16,16 @@ void foo() {
}
// Test attempt to redefine 'id' in an incompatible fashion.
-typedef int id; // FIXME: Decide how we want to deal with this (now that 'id' is more of a built-in type).
+// rdar://11356439
+typedef int id; // expected-error {{typedef redefinition with different types ('int' vs 'id')}}
id b;
+typedef double id; // expected-error {{typedef redefinition with different types ('double' vs 'id')}}
+
+typedef char *id; // expected-error {{typedef redefinition with different types ('char *' vs 'id')}}
+
+typedef union U{ int iu; } *id; // expected-error {{typedef redefinition with different types ('union U *' vs 'id')}}
+
+void test11356439(id o) {
+ o->x; // expected-error {{member reference base type 'id' is not a structure or union}}
+}