diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-04-09 21:30:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-04-09 21:30:38 +0000 |
commit | 78713d86faeaaabb8aeb1683353e791defd3a3bf (patch) | |
tree | d9445273a72b6db8c77799bf6795e3abbce9c03c /lib/Sema/SemaDeclObjC.cpp | |
parent | c42b6520b607cda57e850a60143e9f98bf421dbb (diff) |
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>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@100903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 7e5e40c562..eb3f4222b6 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -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) |