aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-13 01:09:36 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2012-03-13 01:09:36 +0000
commitcd707abbc758149d9f7d37bd0b25298455c678b2 (patch)
tree3eff0bb6d40f23d603990709797bf4e031de642c /lib/Sema
parent78dae24600a877f52dbb6e58bfd5778754a00974 (diff)
Fix crash at @implementation with a forward reference as base class.
rdar://11020003 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152596 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 27bdcd6c8c..d224f1058a 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -925,6 +925,8 @@ Decl *Sema::ActOnStartClassImplementation(
Diag(PrevDecl->getLocation(), diag::note_previous_definition);
} else {
SDecl = dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl);
+ if (SDecl && !SDecl->hasDefinition())
+ SDecl = 0;
if (!SDecl)
Diag(SuperClassLoc, diag::err_undef_superclass)
<< SuperClassname << ClassName;