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
This commit is contained in:
Fariborz Jahanian 2008-12-04 22:56:16 +00:00
Родитель 8fc4dfb30e
Коммит 06de37bade
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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,

Просмотреть файл

@ -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;
}

Просмотреть файл

@ -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