aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
-rw-r--r--lib/Sema/SemaDecl.cpp2
-rw-r--r--test/ARCMT/checking.m2
-rw-r--r--test/SemaObjC/arc-decls.m8
4 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 4e48089e38..31a847b129 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -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">;
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index aa4a865344..fb63953de9 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -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;
}
diff --git a/test/ARCMT/checking.m b/test/ARCMT/checking.m
index a5c364a058..b06f4a731d 100644
--- a/test/ARCMT/checking.m
+++ b/test/ARCMT/checking.m
@@ -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
diff --git a/test/SemaObjC/arc-decls.m b/test/SemaObjC/arc-decls.m
index e9ce415188..cdf6cc64ff 100644
--- a/test/SemaObjC/arc-decls.m
+++ b/test/SemaObjC/arc-decls.m
@@ -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 {