From: Fariborz Jahanian Date: Thu, 2 Dec 2010 21:00:16 +0000 (+0000) Subject: Improve on objc diagnostics. // rdar://8721692 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9e9144f481111255c8a45731d3266ccd7660e95;p=clang Improve on objc diagnostics. // rdar://8721692 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120737 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index eb386fccee..6945c17b92 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -425,7 +425,7 @@ def error_ivar_in_superclass_use : Error< def error_weak_property : Error< "existing ivar %1 for __weak property %0 must be __weak">; def error_strong_property : Error< - "existing ivar %1 for a __strong property %0 must be garbage collectable">; + "property %0 must be declared __weak to match existing ivar %1 with __weak attribute">; def error_dynamic_property_ivar_decl : Error< "dynamic property can not have ivar specification">; def error_duplicate_ivar_use : Error< diff --git a/test/SemaObjC/error-property-gc-attr.m b/test/SemaObjC/error-property-gc-attr.m index 661638c52e..a77b68bff0 100644 --- a/test/SemaObjC/error-property-gc-attr.m +++ b/test/SemaObjC/error-property-gc-attr.m @@ -20,9 +20,9 @@ @implementation INTF @synthesize pweak=IVAR; // expected-error {{existing ivar 'IVAR' for __weak property 'pweak' must be __weak}} -@synthesize NOT=II; // expected-error {{existing ivar 'II' for a __strong property 'NOT' must be garbage collectable}} +@synthesize NOT=II; // expected-error {{property 'NOT' must be declared __weak to match existing ivar 'II' with __weak attribute}} @synthesize WID; @synthesize ID; -@synthesize AWEAK; // expected-error {{existing ivar 'AWEAK' for a __strong property 'AWEAK' must be garbage collectable}} +@synthesize AWEAK; // expected-error {{property 'AWEAK' must be declared __weak to match existing ivar 'AWEAK' with __weak attribute}} @synthesize WI; @end