]> granicus.if.org Git - clang/commitdiff
More PushOnScopeChain() FIXME's.
authorSteve Naroff <snaroff@apple.com>
Thu, 23 Apr 2009 16:00:56 +0000 (16:00 +0000)
committerSteve Naroff <snaroff@apple.com>
Thu, 23 Apr 2009 16:00:56 +0000 (16:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69894 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/PCHReader.cpp
lib/Sema/SemaDeclObjC.cpp
test/PCH/objc_methods.h
test/PCH/objc_methods.m

index 0502a876a3a98d851eac56ee1425ab3b00987481..2f6206dd094ab9bd42ce127f10b59678935c73a9 100644 (file)
@@ -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(
index 7b23b04859e22d325237f65aa0dd64d3a002f63c..446b1258666e7c5bb1bfba63f1730021376ef303 100644 (file)
@@ -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));
     }
index 97617be2931e5839c0db885b622fc7776a6e5c09..4c6b1e1ccec00ae3d3389fb018374c16c0be3993 100644 (file)
@@ -4,3 +4,8 @@
 + alloc;
 - (void)instMethod;
 @end
+
+@class TestForwardClassDecl;
+
+// FIXME: @compatibility_alias  AliasForTestPCH TestPCH;
+
index 818c6145ede1dc25712838e8e8d55f558eb9e52a..2122ff6061244b5883b7ecf20756523bbfc78cf8 100644 (file)
@@ -7,6 +7,10 @@
 
 void func() {
  TestPCH *xx;
+ TestForwardClassDecl *yy;
+// FIXME:
+// AliasForTestPCH *zz;
 #if 0
  xx = [TestPCH alloc];
  [xx instMethod];