diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-17 18:10:54 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-17 18:10:54 +0000 |
commit | 2f14c4d18fcba4b4577dbe43016d6d42ef9973cf (patch) | |
tree | 2c0bd188005ee54ad7839ce45e7321d327a56b78 /lib/Sema/SemaDeclObjC.cpp | |
parent | e3261624c1870e52d7efc2ac83e647713361ac6c (diff) |
Use proper lexcial context for newly added ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | lib/Sema/SemaDeclObjC.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 465c4a9ee1..a7e0145a52 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -825,8 +825,8 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, IDecl->setLocEnd(RBrace); // Add ivar's to class's DeclContext. for (unsigned i = 0, e = numIvars; i != e; ++i) { - ivars[i]->setLexicalDeclContext(IDecl); - IDecl->addDecl(ivars[i]); + ivars[i]->setLexicalDeclContext(ImpDecl); + IDecl->makeDeclVisibleInContext(ivars[i], false); } return; |