From d1148a7f72bca7fb58fe8bfa5e4a58ed3ee99ce6 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Tue, 21 Apr 2009 21:41:56 +0000 Subject: Make sure to mark the interface as completed when we see an @implementation that closes a @class delcaration. - I don't know how to make a test case for this, but this strengthens the invariants that hold internally. The functionality change here is the edit to SemaDeclObjC.cpp. llvm-svn: 69728 --- clang/lib/AST/DeclObjC.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/AST/DeclObjC.cpp') diff --git a/clang/lib/AST/DeclObjC.cpp b/clang/lib/AST/DeclObjC.cpp index 9cc22912caf..5df5ff3a7ad 100644 --- a/clang/lib/AST/DeclObjC.cpp +++ b/clang/lib/AST/DeclObjC.cpp @@ -381,6 +381,7 @@ ObjCInterfaceDecl::FindCategoryDeclaration(IdentifierInfo *CategoryId) const { const FieldDecl * ObjCInterfaceDecl::lookupFieldDeclForIvar(ASTContext &Context, const ObjCIvarDecl *IVar) const { + assert(!isForwardDecl() && "Invalid interface decl!"); const RecordDecl *RecordForDecl = Context.addRecordToClass(this); assert(RecordForDecl && "lookupFieldDeclForIvar no storage for class"); DeclContext::lookup_const_result Lookup = -- cgit v1.2.3