"missing @end")
DIAG(warn_objc_protocol_qualifier_missing_id, WARNING,
"protocol qualifiers without 'id' is archaic")
+DIAG(warn_objc_array_of_interfaces, WARNING,
+ "array of interface '%0' should probably be array of pointers")
DIAG(err_objc_illegal_visibility_spec, ERROR,
"illegal visibility specification")
T = Context.IntTy;
D.setInvalidType(true);
}
+ } else if (T->isObjCInterfaceType()) {
+ Diag(DeclType.Loc, diag::warn_objc_array_of_interfaces,
+ T.getAsString());
}
+
// C99 6.7.5.2p1: The size expression shall have integer type.
if (ArraySize && !ArraySize->getType()->isIntegerType()) {
Diag(ArraySize->getLocStart(), diag::err_array_size_non_int,
@end
+// rdar://4304469
+@interface INT1
+@end
+
+void test2() {
+ INT1 b[3]; // expected-warning {{array of interface 'INT1' should probably be array of pointers}}
+ INT1 *c = &b[0];
+ ++c;
+}
+