diff options
| author | Chris Lattner <sabre@nondot.org> | 2009-02-16 18:32:47 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2009-02-16 18:32:47 +0000 |
| commit | 41fd42e7824f01b6342f72a42a3f563ca4152ab3 (patch) | |
| tree | c641f6593aef943eb565e619db82738af38beb32 /clang/lib/Sema | |
| parent | eb209e7dbd2596d528f7a9b2777ea2e43e7ce7da (diff) | |
| download | bcm5719-llvm-41fd42e7824f01b6342f72a42a3f563ca4152ab3.tar.gz bcm5719-llvm-41fd42e7824f01b6342f72a42a3f563ca4152ab3.zip | |
propagate attributes onto property decls.
llvm-svn: 64643
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 9a4023f0ef4..191ac4b2d40 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1264,9 +1264,9 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl, // ProcessPropertyDecl is responsible for diagnosing conflicts with any // user-defined setter/getter. It also synthesizes setter/getter methods // and adds them to the DeclContext and global method pools. - for (ObjCContainerDecl::prop_iterator i = CDecl->prop_begin(), - e = CDecl->prop_end(); i != e; ++i) - ProcessPropertyDecl((*i), CDecl); + for (ObjCContainerDecl::prop_iterator I = CDecl->prop_begin(), + E = CDecl->prop_end(); I != E; ++I) + ProcessPropertyDecl(*I, CDecl); CDecl->setAtEndLoc(AtEndLoc); } if (ObjCImplementationDecl *IC=dyn_cast<ObjCImplementationDecl>(ClassDecl)) { @@ -1276,10 +1276,10 @@ void Sema::ActOnAtEnd(SourceLocation AtEndLoc, DeclTy *classDecl, } else if (ObjCCategoryImplDecl* CatImplClass = dyn_cast<ObjCCategoryImplDecl>(ClassDecl)) { CatImplClass->setLocEnd(AtEndLoc); - ObjCInterfaceDecl* IDecl = CatImplClass->getClassInterface(); + // Find category interface decl and then check that all methods declared // in this interface are implemented in the category @implementation. - if (IDecl) { + if (ObjCInterfaceDecl* IDecl = CatImplClass->getClassInterface()) { for (ObjCCategoryDecl *Categories = IDecl->getCategoryList(); Categories; Categories = Categories->getNextClassCategory()) { if (Categories->getIdentifier() == CatImplClass->getIdentifier()) { @@ -1586,6 +1586,8 @@ Sema::DeclTy *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, ObjCPropertyDecl *PDecl = ObjCPropertyDecl::Create(Context, DC, AtLoc, FD.D.getIdentifier(), T); DC->addDecl(PDecl); + + ProcessDeclAttributes(PDecl, FD.D); // Regardless of setter/getter attribute, we save the default getter/setter // selector names in anticipation of declaration of setter/getter methods. |

