diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-06 15:53:59 +0000 |
commit | 71438373cd57f0d5d8c93bb5cf690844a0fbc9d0 (patch) | |
tree | 59c928209f8007777dd96568b026bdfe200691de /lib/Sema/SemaObjCProperty.cpp | |
parent | ac616af773f5062edaaf1a0bb5610b49a22ac41f (diff) | |
download | FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.zip FreeBSD-src-71438373cd57f0d5d8c93bb5cf690844a0fbc9d0.tar.gz |
Update clang to r100520.
Diffstat (limited to 'lib/Sema/SemaObjCProperty.cpp')
-rw-r--r-- | lib/Sema/SemaObjCProperty.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Sema/SemaObjCProperty.cpp b/lib/Sema/SemaObjCProperty.cpp index 52b9bcf..cda1f0b 100644 --- a/lib/Sema/SemaObjCProperty.cpp +++ b/lib/Sema/SemaObjCProperty.cpp @@ -160,7 +160,7 @@ Sema::HandlePropertyInClassExtension(Scope *S, ObjCCategoryDecl *CDecl, PIDecl->getSetterName(), DeclPtrTy::make(CCPrimary), isOverridingProperty, MethodImplKind); - PIDecl = ProtocolPtrTy.getAs<ObjCPropertyDecl>(); + PIDecl = cast<ObjCPropertyDecl>(ProtocolPtrTy.getAs<Decl>()); } PIDecl->makeitReadWriteAttribute(); if (Attributes & ObjCDeclSpec::DQ_PR_retain) @@ -281,7 +281,8 @@ Sema::DeclPtrTy Sema::ActOnPropertyImplDecl(SourceLocation AtLoc, DeclPtrTy ClassCatImpDecl, IdentifierInfo *PropertyId, IdentifierInfo *PropertyIvar) { - ObjCContainerDecl *ClassImpDecl = ClassCatImpDecl.getAs<ObjCContainerDecl>(); + ObjCContainerDecl *ClassImpDecl = + cast_or_null<ObjCContainerDecl>(ClassCatImpDecl.getAs<Decl>()); // Make sure we have a context for the property implementation declaration. if (!ClassImpDecl) { Diag(AtLoc, diag::error_missing_property_context); @@ -984,7 +985,10 @@ void Sema::CheckObjCPropertyAttributes(DeclPtrTy PropertyPtrTy, unsigned &Attributes) { // FIXME: Improve the reported location. Decl *PDecl = PropertyPtrTy.getAs<Decl>(); - ObjCPropertyDecl *PropertyDecl = dyn_cast_or_null<ObjCPropertyDecl>(PDecl); + if (!PDecl) + return; + + ObjCPropertyDecl *PropertyDecl = cast<ObjCPropertyDecl>(PDecl); QualType PropertyTy = PropertyDecl->getType(); // readonly and readwrite/assign/retain/copy conflict. |