]> granicus.if.org Git - clang/commitdiff
call objc interfaces just "interfaces" in diagnostics, not "Objective-C types"
authorChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 08:25:48 +0000 (08:25 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 12 Apr 2009 08:25:48 +0000 (08:25 +0000)
or "Objective-C interface types" etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68892 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticSemaKinds.td
test/SemaObjC/catch-stmt.m
test/SemaObjC/exception-go-boom.m
test/SemaObjC/invalid-objc-decls-1.m

index 6c76e4aa2700789166e3be91ac3d76ef46871d2d..25aa58fffbb12f092f64d47b07bba290e1c5cdf9 100644 (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<
index 18b3ee3452b7f50fe36260a18355336e09b90d72..6dcbcdebfba44f3dc85a5afab8f3c5c35c5a6009 100644 (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}}
   }
 }
index 32dc82dba038cb6bd63b18d6b9134f28f4b6bfa7..1d792c4c131a53a9a9180087e11bb61076c07dfc 100644 (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}}
   }
 }
 
index 540000b248277fd0c838c2d490b922c74c6aaa3e..e3a94f62d5a60143a73d02913f90d1bf2f7ead94 100644 (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;
 }