diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:34 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2010-04-03 07:51:34 +0000 |
commit | ac616af773f5062edaaf1a0bb5610b49a22ac41f (patch) | |
tree | 1e9c2f464daf7966d11aa31cf069fa1bc63fdb21 /lib/Sema/SemaDecl.cpp | |
parent | 07b2cfcdb817cc0790420f159a313d61e7241cb9 (diff) | |
download | FreeBSD-src-ac616af773f5062edaaf1a0bb5610b49a22ac41f.zip FreeBSD-src-ac616af773f5062edaaf1a0bb5610b49a22ac41f.tar.gz |
Update clang to r100285.
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index f3d0dcf..541c271 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -5740,17 +5740,15 @@ Sema::DeclPtrTy Sema::ActOnIvar(Scope *S, Visibility != tok::objc_not_keyword ? TranslateIvarVisibility(Visibility) : ObjCIvarDecl::None; // Must set ivar's DeclContext to its enclosing interface. - Decl *EnclosingDecl = IntfDecl.getAs<Decl>(); - DeclContext *EnclosingContext; + ObjCContainerDecl *EnclosingDecl = IntfDecl.getAs<ObjCContainerDecl>(); + ObjCContainerDecl *EnclosingContext; if (ObjCImplementationDecl *IMPDecl = dyn_cast<ObjCImplementationDecl>(EnclosingDecl)) { // Case of ivar declared in an implementation. Context is that of its class. - ObjCInterfaceDecl* IDecl = IMPDecl->getClassInterface(); - assert(IDecl && "No class- ActOnIvar"); - EnclosingContext = cast_or_null<DeclContext>(IDecl); + EnclosingContext = IMPDecl->getClassInterface(); + assert(EnclosingContext && "Implementation has no class interface!"); } else - EnclosingContext = dyn_cast<DeclContext>(EnclosingDecl); - assert(EnclosingContext && "null DeclContext for ivar - ActOnIvar"); + EnclosingContext = EnclosingDecl; // Construct the decl. ObjCIvarDecl *NewID = ObjCIvarDecl::Create(Context, |