aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-21 21:41:56 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-21 21:41:56 +0000
commit24c8991f4dd0ab86678b5ab11f05586687b55be9 (patch)
tree50defd3e554fad9cdedf93ac775308ffad4384a4 /lib/Sema/SemaDeclObjC.cpp
parent5bd0939989e31113dcded537176311a822682422 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 5ab1efec03..2874f27cd3 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/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 =