diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-04-21 21:41:56 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-04-21 21:41:56 +0000 |
commit | d1148a7f72bca7fb58fe8bfa5e4a58ed3ee99ce6 (patch) | |
tree | b790504d28b749136e1af4756742020e61856a40 /clang/lib/AST/DeclObjC.cpp | |
parent | d361c345c62f1739b1daf6cae8977f265a235ebe (diff) | |
download | bcm5719-llvm-d1148a7f72bca7fb58fe8bfa5e4a58ed3ee99ce6.tar.gz bcm5719-llvm-d1148a7f72bca7fb58fe8bfa5e4a58ed3ee99ce6.zip |
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
Diffstat (limited to 'clang/lib/AST/DeclObjC.cpp')
-rw-r--r-- | clang/lib/AST/DeclObjC.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
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 = |