When upgrading an Objective-C class from a forward declaration to a
full-fledged @interface, be sure that the declaration has the right lexical context. <rdar://problem/7827709> llvm-svn: 100903
This commit is contained in:
parent
06aa50417d
commit
530805711f
|
@ -98,6 +98,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc,
|
|||
// Since this ObjCInterfaceDecl was created by a forward declaration,
|
||||
// we now add it to the DeclContext since it wasn't added before
|
||||
// (see ActOnForwardClassDeclaration).
|
||||
IDecl->setLexicalDeclContext(CurContext);
|
||||
CurContext->addDecl(IDecl);
|
||||
|
||||
if (AttrList)
|
||||
|
|
|
@ -2,3 +2,11 @@
|
|||
extern "C" {
|
||||
@class Protocol;
|
||||
}
|
||||
|
||||
// <rdar://problem/7827709>
|
||||
extern "C" {
|
||||
@class I;
|
||||
}
|
||||
|
||||
@interface I
|
||||
@end
|
||||
|
|
Loading…
Reference in New Issue