summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-04-23 16:00:56 +0000
committerSteve Naroff <snaroff@apple.com>2009-04-23 16:00:56 +0000
commit0cbba990d7f689c90092d86da62ab076aedd3954 (patch)
treee60f9d4a8e5e19e784dac1b2030902141db21c91
parentd6f9713634f97a8f2a380df9b273884710d4d620 (diff)
downloadbcm5719-llvm-0cbba990d7f689c90092d86da62ab076aedd3954.tar.gz
bcm5719-llvm-0cbba990d7f689c90092d86da62ab076aedd3954.zip
More PushOnScopeChain() FIXME's.
llvm-svn: 69894
-rw-r--r--clang/lib/Frontend/PCHReader.cpp1
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp6
-rw-r--r--clang/test/PCH/objc_methods.h5
-rw-r--r--clang/test/PCH/objc_methods.m4
4 files changed, 11 insertions, 5 deletions
diff --git a/clang/lib/Frontend/PCHReader.cpp b/clang/lib/Frontend/PCHReader.cpp
index 0502a876a3a..2f6206dd094 100644
--- a/clang/lib/Frontend/PCHReader.cpp
+++ b/clang/lib/Frontend/PCHReader.cpp
@@ -2743,7 +2743,6 @@ PCHReader::ReadDeclarationName(const RecordData &Record, unsigned &Idx) {
case DeclarationName::ObjCOneArgSelector:
case DeclarationName::ObjCMultiArgSelector:
return DeclarationName(GetSelector(Record, Idx));
- break;
case DeclarationName::CXXConstructorName:
return Context.DeclarationNames.getCXXConstructorName(
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 7b23b04859e..446b1258666 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -206,8 +206,7 @@ Sema::DeclPtrTy Sema::ActOnCompatiblityAlias(SourceLocation AtLoc,
ObjCAliasDecls[AliasName] = AliasDecl;
- // FIXME: PushOnScopeChains?
- CurContext->addDecl(Context, AliasDecl);
+ PushOnScopeChains(AliasDecl, TUScope);
if (!CheckObjCDeclScope(AliasDecl))
TUScope->AddDecl(DeclPtrTy::make(AliasDecl));
@@ -1048,8 +1047,7 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc,
IdentList[i], SourceLocation(), true);
ObjCInterfaceDecls[IdentList[i]] = IDecl;
- // FIXME: PushOnScopeChains?
- CurContext->addDecl(Context, IDecl);
+ PushOnScopeChains(IDecl, TUScope);
// Remember that this needs to be removed when the scope is popped.
TUScope->AddDecl(DeclPtrTy::make(IDecl));
}
diff --git a/clang/test/PCH/objc_methods.h b/clang/test/PCH/objc_methods.h
index 97617be2931..4c6b1e1ccec 100644
--- a/clang/test/PCH/objc_methods.h
+++ b/clang/test/PCH/objc_methods.h
@@ -4,3 +4,8 @@
+ alloc;
- (void)instMethod;
@end
+
+@class TestForwardClassDecl;
+
+// FIXME: @compatibility_alias AliasForTestPCH TestPCH;
+
diff --git a/clang/test/PCH/objc_methods.m b/clang/test/PCH/objc_methods.m
index 818c6145ede..2122ff60612 100644
--- a/clang/test/PCH/objc_methods.m
+++ b/clang/test/PCH/objc_methods.m
@@ -7,6 +7,10 @@
void func() {
TestPCH *xx;
+ TestForwardClassDecl *yy;
+// FIXME:
+// AliasForTestPCH *zz;
+
#if 0
xx = [TestPCH alloc];
[xx instMethod];
OpenPOWER on IntegriCloud