the definition of that class. Fixes PR11613 / <rdar://problem/
10604077>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146976
91177308-0d34-0410-b5e6-
96231b3b80d8
const ASTRecordLayout &
ASTContext::getObjCLayout(const ObjCInterfaceDecl *D,
const ObjCImplementationDecl *Impl) const {
- assert(D->isThisDeclarationADefinition() && "Invalid interface decl!");
+ // Retrieve the definition
+ D = D->getDefinition();
+ assert(D && D->isThisDeclarationADefinition() && "Invalid interface decl!");
// Look up this layout, if already laid out, return what we have.
ObjCContainerDecl *Key =
@implementation A
@synthesize p0 = _p0;
@end
+
+@interface B
+@end
+@class B;
+@implementation B
+@end