summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/SemaObjC/protocol-archane.m8
-rw-r--r--clang/test/SemaObjC/protocol-atttribute-1.m4
2 files changed, 9 insertions, 3 deletions
diff --git a/clang/test/SemaObjC/protocol-archane.m b/clang/test/SemaObjC/protocol-archane.m
index 2cba1fad051..647c5e74a65 100644
--- a/clang/test/SemaObjC/protocol-archane.m
+++ b/clang/test/SemaObjC/protocol-archane.m
@@ -26,4 +26,10 @@ void foo(id x) {
typedef int NotAnObjCObjectType;
// GCC doesn't diagnose this.
-NotAnObjCObjectType <SomeProtocol> *obj; // expected-warning {{ignoring protocol qualifiers on non-ObjC type}}
+NotAnObjCObjectType <SomeProtocol> *obj; // expected-error {{invalid protocol qualifiers on non-ObjC type}}
+
+// Decided not to support the following GCC extension. Found while researching rdar://6497631
+typedef struct objc_class *Class;
+
+Class <SomeProtocol> UnfortunateGCCExtension; // expected-error {{protocol qualified 'Class' is unsupported}}
+
diff --git a/clang/test/SemaObjC/protocol-atttribute-1.m b/clang/test/SemaObjC/protocol-atttribute-1.m
index 1d3aec64c42..1934091fe93 100644
--- a/clang/test/SemaObjC/protocol-atttribute-1.m
+++ b/clang/test/SemaObjC/protocol-atttribute-1.m
@@ -3,7 +3,7 @@
__attribute ((unavailable))
@protocol FwProto; // expected-note{{marked unavailable}}
-Class <FwProto> cFw = 0; // expected-warning {{'FwProto' is unavailable}} expected-warning{{ignoring protocol qualifiers on non-ObjC type}}
+Class <FwProto> cFw = 0; // expected-warning {{'FwProto' is unavailable}} expected-error{{protocol qualified 'Class' is unsupported}}
__attribute ((deprecated)) @protocol MyProto1
@@ -31,7 +31,7 @@ __attribute ((deprecated)) @protocol MyProto1
-Class <MyProto1> clsP1 = 0; // expected-warning {{'MyProto1' is deprecated}} expected-warning{{ignoring protocol qualifiers on non-ObjC type}}
+Class <MyProto1> clsP1 = 0; // expected-warning {{'MyProto1' is deprecated}} expected-error{{protocol qualified 'Class' is unsupported}}
@protocol FwProto @end // expected-note{{marked unavailable}}
OpenPOWER on IntegriCloud