"array of interface %0 should probably be an array of pointers")
DIAG(ext_c99_array_usage, EXTENSION,
"use of C99-specific array features, accepted as an extension")
+DIAG(warn_ignoring_objc_qualifiers, WARNING,
+ "ignoring protocol qualifiers on non-ObjC type")
// id<protocol-list>
Result = Context.getObjCQualifiedIdType((ObjCProtocolDecl**)PQ,
DS.getNumProtocolQualifiers());
+ else
+ Diag(DS.getSourceRange().getBegin(),
+ diag::warn_ignoring_objc_qualifiers) << DS.getSourceRange();
}
// TypeQuals handled by caller.
break;
// FIXME: provide a better diagnostic (no typedef).
- (void)m2:(id <MyProtocol> short)arg1; // expected-error {{'short type-name' is invalid}}
-@end
\ No newline at end of file
+@end
+
+typedef int NotAnObjCObjectType;
+
+// GCC doesn't diagnose this.
+NotAnObjCObjectType <SomeProtocol> *obj; // expected-warning {{ignoring protocol qualifiers on non-ObjC type}}