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/Sema/SemaDeclObjC.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/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 5ab1efec037..2874f27cd3b 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -668,6 +668,11 @@ Sema::DeclPtrTy Sema::ActOnStartClassImplementation( CurContext->addDecl(Context, IDecl); // Remember that this needs to be removed when the scope is popped. TUScope->AddDecl(DeclPtrTy::make(IDecl)); + } else { + // Mark the interface as being completed, even if it was just as + // @class ....; + // declaration; the user cannot reopen it. + IDecl->setForwardDecl(false); } ObjCImplementationDecl* IMPDecl = |