]> granicus.if.org Git - clang/commitdiff
Undo my re-wording of the "ARC forbids Objective-C objects in ..."
authorDouglas Gregor <dgregor@apple.com>
Mon, 28 Jan 2013 20:13:44 +0000 (20:13 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 28 Jan 2013 20:13:44 +0000 (20:13 +0000)
error. Jordan is right.

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

include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaDecl.cpp
test/ARCMT/checking.m
test/SemaObjC/arc-decls.m

index 4e48089e38d4f6050f94128029bf15f0c8ff2427..31a847b129daed2f6a0842c5c57a253f1b5ad0d4 100644 (file)
@@ -3697,8 +3697,8 @@ def err_arc_mismatched_cast : Error<
 def err_arc_nolifetime_behavior : Error<
   "explicit ownership qualifier on cast result has no effect">;
 def err_arc_objc_object_in_tag : Error<
-  "ARC forbids %select{Objective-C objects|blocks}0 of type %1 in "
-  "%select{struct|interface|union|<<ERROR>>|enum}2">;
+  "ARC forbids %select{Objective-C objects|blocks}0 in "
+  "%select{struct|interface|union|<<ERROR>>|enum}1">;
 def err_arc_objc_property_default_assign_on_object : Error<
   "ARC forbids synthesizing a property of an Objective-C object "
   "with unspecified ownership or storage attribute">;
index aa4a865344f0ae5356c38cec78fec23a40f17a44..fb63953de92891d7c574a0445b97ea37bb89edbb 100644 (file)
@@ -10516,7 +10516,7 @@ void Sema::ActOnFields(Scope* S,
           }
         } else {
           Diag(FD->getLocation(), diag::err_arc_objc_object_in_tag) 
-            << T->isBlockPointerType() << T << Record->getTagKind();
+            << T->isBlockPointerType() << Record->getTagKind();
         }
         ARCErrReported = true;
       }
index a5c364a05852404251bd781d6b6eb1526d8ca8ac..b06f4a731dc781f9c4a299f98c27d515adc48b01 100644 (file)
@@ -117,7 +117,7 @@ void test1(A *a, BOOL b, struct UnsafeS *unsafeS) {
 }
 
 struct S {
-  A* a; // expected-error {{ARC forbids Objective-C objects of type 'A *__strong' in struct}}
+  A* a; // expected-error {{ARC forbids Objective-C objects in struct}}
 };
 
 @interface B
index e9ce4151883013414154468e82195a5a39973301..cdf6cc64ff2d6dd962532f164df02787d57e51b5 100644 (file)
@@ -3,17 +3,17 @@
 // rdar://8843524
 
 struct A {
-    id x; // expected-error {{ARC forbids Objective-C objects of type '__strong id' in struct}}
+    id x; // expected-error {{ARC forbids Objective-C objects in struct}}
 };
 
 union u {
-    id u; // expected-error {{ARC forbids Objective-C objects of type '__strong id' in union}}
+    id u; // expected-error {{ARC forbids Objective-C objects in union}}
 };
 
 @interface I {
    struct A a; 
    struct B {
-    id y[10][20]; // expected-error {{ARC forbids Objective-C objects}}
+    id y[10][20]; // expected-error {{ARC forbids Objective-C objects in struct}}
     id z;
    } b;
 
@@ -23,7 +23,7 @@ union u {
 
 // rdar://10260525
 struct r10260525 {
-  id (^block) (); // expected-error {{ARC forbids blocks of type 'id (^__strong)()' in struct}}
+  id (^block) (); // expected-error {{ARC forbids blocks in struct}}
 };
 
 struct S {