diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-14 18:35:57 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-05-14 18:35:57 +0000 |
commit | bdb1b0d6cb9688b70491265566f76c1e401fa376 (patch) | |
tree | 2bbf5708f58c7a1d7d5ffa8ee06da1500bc493bc /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | e6e847079ce3b483892068ee6a2732dee7a6c660 (diff) | |
download | bcm5719-llvm-bdb1b0d6cb9688b70491265566f76c1e401fa376.tar.gz bcm5719-llvm-bdb1b0d6cb9688b70491265566f76c1e401fa376.zip |
Implement new default property synthesis rules. Essentially, no longer
user directive is needed to force a property implementation.
It is decided based on those propeties which are declared in
the class (or in its protocols) but not those which must be
default implemented by one of its super classes. Implements radar 7923851.
llvm-svn: 103787
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index b7d737984c7..9ed96921141 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -938,7 +938,7 @@ void Sema::ImplMethodsVsClassMethods(Scope *S, ObjCImplDecl* IMPDecl, // Check and see if properties declared in the interface have either 1) // an implementation or 2) there is a @synthesize/@dynamic implementation // of the property in the @implementation. - if (isa<ObjCInterfaceDecl>(CDecl)) + if (isa<ObjCInterfaceDecl>(CDecl) && !LangOpts.ObjCNonFragileABI2) DiagnoseUnimplementedProperties(S, IMPDecl, CDecl, InsMap); llvm::DenseSet<Selector> ClsMap; @@ -1433,6 +1433,8 @@ void Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd, if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) { IC->setAtEndRange(AtEnd); if (ObjCInterfaceDecl* IDecl = IC->getClassInterface()) { + if (LangOpts.ObjCNonFragileABI2) + DefaultSynthesizeProperties(S, IC, IDecl); ImplMethodsVsClassMethods(S, IC, IDecl); AtomicPropertySetterGetterRules(IC, IDecl); if (LangOpts.ObjCNonFragileABI2) |