]> granicus.if.org Git - clang/commitdiff
Output better diagnostics for continuation class
authorFariborz Jahanian <fjahanian@apple.com>
Thu, 4 Dec 2008 22:56:16 +0000 (22:56 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Thu, 4 Dec 2008 22:56:16 +0000 (22:56 +0000)
property attribute mis-specification.

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

include/clang/Basic/DiagnosticKinds.def
lib/Sema/SemaDeclObjC.cpp
test/SemaObjC/continuation-class-err.m

index e48de866d664ea18589795e056ada3b04b325c86..2fd6ac5afed978327f6a3dc918652611189795e8 100644 (file)
@@ -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,
index ed875166878256ed5c8348450af269d2951f581d..b3afd78fc7adc9d5a6a79ff39c6776f426c39393 100644 (file)
@@ -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;
         }
index 1d4725f887571c82087b3493eadb5afb015932b1..321615ece31c3947332bd40384eae2e3938aca0b 100644 (file)
@@ -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