call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"

or "Objective-C interface types" etc.

llvm-svn: 68892
This commit is contained in:
Chris Lattner 2009-04-12 08:25:48 +00:00
parent a8a7d0f371
commit 261b6a5c3a
4 changed files with 19 additions and 17 deletions

View File

@ -106,9 +106,9 @@ def err_builtin_definition : Error<"definition of builtin function %0">;
/// parser diagnostics
def ext_typedef_without_a_name : ExtWarn<"typedef requires a name">;
def err_statically_allocated_object : Error<
"Objective-C type cannot be statically allocated">;
"interface type cannot be statically allocated">;
def err_object_cannot_be_passed_returned_by_value : Error<
"Objective-C interface type %1 cannot be %select{returned|passed}0 by value">;
"interface type %1 cannot be %select{returned|passed}0 by value">;
def warn_enum_value_overflow : Warning<"overflow in enumeration value">;
def warn_pragma_pack_invalid_alignment : Warning<
"expected #pragma pack parameter to be '1', '2', '4', '8', or '16'">;
@ -1017,7 +1017,7 @@ def error_no_super_class : Error<
def err_invalid_receiver_to_message : Error<
"invalid receiver to message expression">;
def warn_bad_receiver_type : Warning<
"receiver type %0 is not 'id' or Objective-C interface pointer, consider "
"receiver type %0 is not 'id' or interface pointer, consider "
"casting it to 'id'">;
def err_bad_receiver_type : Error<"bad receiver type %0">;
def error_objc_throw_expects_object : Error<
@ -1027,7 +1027,7 @@ def error_rethrow_used_outside_catch : Error<
def err_attribute_multiple_objc_gc : Error<
"multiple garbage collection attributes specified for type">;
def err_catch_param_not_objc_type : Error<
"@catch parameter is not an Objective-C class type">;
"@catch parameter is not a pointer to an interface type">;
def err_illegal_qualifiers_on_catch_parm : Error<
"illegal qualifiers on @catch parameter">;
def err_illegal_super_cast : Error<

View File

@ -4,9 +4,9 @@
void f() {
@try {
} @catch (void a) { // expected-error{{@catch parameter is not an Objective-C class type}}
} @catch (int) { // expected-error{{@catch parameter is not an Objective-C class type}}
} @catch (int *b) { // expected-error{{@catch parameter is not an Objective-C class type}}
} @catch (void a) { // expected-error{{@catch parameter is not a pointer to an interface type}}
} @catch (int) { // expected-error{{@catch parameter is not a pointer to an interface type}}
} @catch (int *b) { // expected-error{{@catch parameter is not a pointer to an interface type}}
} @catch (id <P> c) { // expected-error{{illegal qualifiers on @catch parameter}}
}
}

View File

@ -3,7 +3,9 @@
// Note: NSException is not declared.
void f0(id x) {
@try {
} @catch (NSException *x) { // expected-warning{{type specifier missing, defaults to 'int'}} expected-error{{@catch parameter is not an Objective-C class type}}
} @catch (NSException *x) { // \
expected-warning{{type specifier missing, defaults to 'int'}} \
expected-error{{@catch parameter is not a pointer to an interface type}}
}
}

View File

@ -1,34 +1,34 @@
// RUN: clang-cc -fsyntax-only -verify %s
@interface Super @end
Super s1; // expected-error{{Objective-C type cannot be statically allocated}}
Super s1; // expected-error{{interface type cannot be statically allocated}}
extern Super e1; // expected-error{{Objective-C type cannot be statically allocated}}
extern Super e1; // expected-error{{interface type cannot be statically allocated}}
struct S {
Super s1; // expected-error{{Objective-C type cannot be statically allocated}}
Super s1; // expected-error{{interface type cannot be statically allocated}}
};
@protocol P1 @end
@interface INTF
{
Super ivar1; // expected-error{{Objective-C type cannot be statically allocated}}
Super ivar1; // expected-error{{interface type cannot be statically allocated}}
}
@end
struct whatever {
Super objField; // expected-error{{Objective-C type cannot be statically allocated}}
Super objField; // expected-error{{interface type cannot be statically allocated}}
};
@interface MyIntf
{
Super<P1> ivar1; // expected-error{{Objective-C type cannot be statically allocated}}
Super<P1> ivar1; // expected-error{{interface type cannot be statically allocated}}
}
@end
Super foo( // expected-error{{Objective-C interface type 'Super' cannot be returned by value}}
Super parm1) { // expected-error{{Objective-C interface type 'Super' cannot be passed by value}}
Super p1; // expected-error{{Objective-C type cannot be statically allocated}}
Super foo( // expected-error{{interface interface type 'Super' cannot be returned by value}}
Super parm1) { // expected-error{{interface interface type 'Super' cannot be passed by value}}
Super p1; // expected-error{{interface type cannot be statically allocated}}
return p1;
}