diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-04 22:56:16 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-04 22:56:16 +0000 |
commit | 06de37bade11b2d4187a1e4f74d0dcf2a72dda39 (patch) | |
tree | 8b55c240f00b28600244c1d742a26d774abdf30a | |
parent | 8fc4dfb30e8bd94ca2ea7adb6cbece04fb96cd99 (diff) |
Output better diagnostics for continuation class
property attribute mis-specification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60562 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/DiagnosticKinds.def | 2 | ||||
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 2 | ||||
-rw-r--r-- | test/SemaObjC/continuation-class-err.m | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def index e48de866d6..2fd6ac5afe 100644 --- a/include/clang/Basic/DiagnosticKinds.def +++ b/include/clang/Basic/DiagnosticKinds.def @@ -566,7 +566,7 @@ DIAG(warn_property_type, WARNING, DIAG(err_continuation_class, ERROR, "continuation class has no primary class") DIAG(err_use_continuation_class, ERROR, - "use contination class to override 'readonly' property with 'readwrite'") + "attribute of property in continuation class of %0 can only be 'readwrite'") DIAG(warn_property_attr_mismatch, WARNING, "property attribute in continuation class does not match the primary class") DIAG(err_accessor_property_type_mismatch, ERROR, diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index ed87516687..b3afd78fc7 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -1283,7 +1283,7 @@ Sema::DeclTy *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, PIDecl->setSetterMethodDecl(SetterDecl); } else - Diag(AtLoc, diag::err_use_continuation_class); + Diag(AtLoc, diag::err_use_continuation_class) << ICDecl->getDeclName(); *isOverridingProperty = true; return 0; } diff --git a/test/SemaObjC/continuation-class-err.m b/test/SemaObjC/continuation-class-err.m index 1d4725f887..321615ece3 100644 --- a/test/SemaObjC/continuation-class-err.m +++ b/test/SemaObjC/continuation-class-err.m @@ -11,5 +11,5 @@ @interface ReadOnly () @property(readwrite, copy) id object; // expected-warning {{property attribute in continuation class does not match the primary class}} -@property(readonly) id object1; // expected-error {{use contination class to override 'readonly' property with 'readwrite'}} +@property(readonly) id object1; // expected-error {{attribute of property in continuation class of 'ReadOnly' can only be 'readwrite'}} @end |