diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-17 17:00:07 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-02-17 17:00:07 +0000 |
commit | 20912d644a5eddcdf130e1ade03e884c19774978 (patch) | |
tree | 689b49ab15c86214a769b563b86f89bf29b6e6df /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | 98d156a87e72d1a1c59318ca68cafdc2e16e9360 (diff) | |
download | bcm5719-llvm-20912d644a5eddcdf130e1ade03e884c19774978.tar.gz bcm5719-llvm-20912d644a5eddcdf130e1ade03e884c19774978.zip |
Allow for declaration and use of ivars in a stand-alone
implementation (toward radar 7547942).
llvm-svn: 96479
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 1e9b56a90ed..465c4a9ee18 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -823,6 +823,12 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl, if (IDecl->isImplicitInterfaceDecl()) { IDecl->setIVarList(ivars, numIvars, Context); 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]); + } + return; } // If implementation has empty ivar list, just return. |