mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-11 17:08:42 +00:00
Use Decl::getAvailability() rather than checking for the "unavailable"
attribute when determining whether we need to see an implementation of a property. Fixes <rdar://problem/12958191>. llvm-svn: 171877
This commit is contained in:
parent
7e6a7a19e3
commit
c4c1fb39d8
@ -1605,7 +1605,8 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl,
|
|||||||
// Is there a matching propery synthesize/dynamic?
|
// Is there a matching propery synthesize/dynamic?
|
||||||
if (Prop->isInvalidDecl() ||
|
if (Prop->isInvalidDecl() ||
|
||||||
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
|
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
|
||||||
PropImplMap.count(Prop) || Prop->hasAttr<UnavailableAttr>())
|
PropImplMap.count(Prop) ||
|
||||||
|
Prop->getAvailability() == AR_Unavailable)
|
||||||
continue;
|
continue;
|
||||||
if (!InsMap.count(Prop->getGetterName())) {
|
if (!InsMap.count(Prop->getGetterName())) {
|
||||||
Diag(IMPDecl->getLocation(),
|
Diag(IMPDecl->getLocation(),
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -verify -Wno-objc-root-class %s
|
||||||
// expected-no-diagnostics
|
// expected-no-diagnostics
|
||||||
// rdar://9651605
|
// rdar://9651605
|
||||||
|
// rdar://12958191
|
||||||
|
|
||||||
@interface Foo
|
@interface Foo
|
||||||
@property (getter=getVal) int val __attribute__((unavailable));
|
@property (getter=getVal) int val __attribute__((unavailable));
|
||||||
|
@property (getter=getVal) int val2 __attribute__((availability(macosx,unavailable)));
|
||||||
- Method __attribute__((unavailable));
|
- Method __attribute__((unavailable));
|
||||||
+ CMethod __attribute__((unavailable));
|
+ CMethod __attribute__((unavailable));
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user