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 | 5271058c758dac21ef82ee717476227874049449 (patch) | |
| tree | 69163dff94c24ff2d3f03e660e1cb1a6b09ff5e2 | |
| parent | c7c6dd4d9793d4f3747a0011fe10108724b8a8e6 (diff) | |
| download | bcm5719-llvm-5271058c758dac21ef82ee717476227874049449.tar.gz bcm5719-llvm-5271058c758dac21ef82ee717476227874049449.zip | |
Output better diagnostics for continuation class
property attribute mis-specification.
llvm-svn: 60562
| -rw-r--r-- | clang/include/clang/Basic/DiagnosticKinds.def | 2 | ||||
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaObjC/continuation-class-err.m | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/clang/include/clang/Basic/DiagnosticKinds.def b/clang/include/clang/Basic/DiagnosticKinds.def index e48de866d66..2fd6ac5afed 100644 --- a/clang/include/clang/Basic/DiagnosticKinds.def +++ b/clang/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/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index ed875166878..b3afd78fc7a 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/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/clang/test/SemaObjC/continuation-class-err.m b/clang/test/SemaObjC/continuation-class-err.m index 1d4725f8875..321615ece31 100644 --- a/clang/test/SemaObjC/continuation-class-err.m +++ b/clang/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 |

