зеркало из https://github.com/microsoft/clang-1.git
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:
Родитель
8fc4dfb30e
Коммит
06de37bade
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче