From: Chris Lattner Date: Sun, 12 Apr 2009 08:25:48 +0000 (+0000) Subject: call objc interfaces just "interfaces" in diagnostics, not "Objective-C types" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05af26216bc704b893dee860cb84de28d801a7f6;p=clang call objc interfaces just "interfaces" in diagnostics, not "Objective-C types" or "Objective-C interface types" etc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68892 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 6c76e4aa27..25aa58fffb 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -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< diff --git a/test/SemaObjC/catch-stmt.m b/test/SemaObjC/catch-stmt.m index 18b3ee3452..6dcbcdebfb 100644 --- a/test/SemaObjC/catch-stmt.m +++ b/test/SemaObjC/catch-stmt.m @@ -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

c) { // expected-error{{illegal qualifiers on @catch parameter}} } } diff --git a/test/SemaObjC/exception-go-boom.m b/test/SemaObjC/exception-go-boom.m index 32dc82dba0..1d792c4c13 100644 --- a/test/SemaObjC/exception-go-boom.m +++ b/test/SemaObjC/exception-go-boom.m @@ -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}} } } diff --git a/test/SemaObjC/invalid-objc-decls-1.m b/test/SemaObjC/invalid-objc-decls-1.m index 540000b248..e3a94f62d5 100644 --- a/test/SemaObjC/invalid-objc-decls-1.m +++ b/test/SemaObjC/invalid-objc-decls-1.m @@ -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 ivar1; // expected-error{{Objective-C type cannot be statically allocated}} + Super 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; }