forked from OSchip/llvm-project
No need to warn if 'unavailable' method/property
is not implemented. // rdar://9651605 llvm-svn: 133819
This commit is contained in:
parent
6629b574b3
commit
9fc39c4944
|
@ -1076,6 +1076,9 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl,
|
|||
|
||||
void Sema::WarnUndefinedMethod(SourceLocation ImpLoc, ObjCMethodDecl *method,
|
||||
bool &IncompleteImpl, unsigned DiagID) {
|
||||
// No point warning no definition of method which is 'unavailable'.
|
||||
if (method->hasAttr<UnavailableAttr>())
|
||||
return;
|
||||
if (!IncompleteImpl) {
|
||||
Diag(ImpLoc, diag::warn_incomplete_impl);
|
||||
IncompleteImpl = true;
|
||||
|
|
|
@ -1273,7 +1273,7 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl,
|
|||
// Is there a matching propery synthesize/dynamic?
|
||||
if (Prop->isInvalidDecl() ||
|
||||
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
|
||||
PropImplMap.count(Prop))
|
||||
PropImplMap.count(Prop) || Prop->hasAttr<UnavailableAttr>())
|
||||
continue;
|
||||
if (!InsMap.count(Prop->getGetterName())) {
|
||||
Diag(Prop->getLocation(),
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
||||
// rdar://9651605
|
||||
|
||||
@interface Foo
|
||||
@property (getter=getVal) int val __attribute__((unavailable));
|
||||
- Method __attribute__((unavailable));
|
||||
+ CMethod __attribute__((unavailable));
|
||||
@end
|
||||
|
||||
@implementation Foo
|
||||
@end
|
||||
|
Loading…
Reference in New Issue