]> granicus.if.org Git - clang/commitdiff
Rename several ObjC action methods to use the "ActOn" prefix (still a few more to...
authorSteve Naroff <snaroff@apple.com>
Tue, 2 Oct 2007 22:39:18 +0000 (22:39 +0000)
committerSteve Naroff <snaroff@apple.com>
Tue, 2 Oct 2007 22:39:18 +0000 (22:39 +0000)
Remove Action::ObjCStartCategoryInterface/ObjCFinishInterface - they are unused.
.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42559 91177308-0d34-0410-b5e6-96231b3b80d8

Parse/MinimalAction.cpp
Parse/ParseObjc.cpp
Sema/Sema.h
Sema/SemaDecl.cpp
clang.xcodeproj/project.pbxproj
include/clang/Parse/Action.h

index d9fc5c539c199dbdef9dc3c9c4ce0a21841f0635..dc0a9cc4e9e77ed580821b2cbb37e48d47d47601 100644 (file)
@@ -93,10 +93,10 @@ MinimalAction::ObjcStartProtoInterface(Scope* S,
   return 0;
 }
 
-/// ObjcClassDeclaration - 
+/// ActOnForwardClassDeclaration - 
 /// Scope will always be top level file scope. 
 Action::DeclTy *
-MinimalAction::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+MinimalAction::ActOnForwardClassDeclaration(Scope *S, SourceLocation AtClassLoc,
                                 IdentifierInfo **IdentList, unsigned NumElts) {
   for (unsigned i = 0; i != NumElts; ++i) {
     TypeNameInfo *TI =
@@ -110,11 +110,11 @@ MinimalAction::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
   return 0;
 }
 
-/// ObjcForwardProtocolDeclaration - 
+/// ActOnForwardProtocolDeclaration - 
 /// Scope will always be top level file scope. 
 Action::DeclTy *
-MinimalAction::ObjcForwardProtocolDeclaration(Scope *S, SourceLocation AtClassLoc,
-                 IdentifierInfo **IdentList, unsigned NumElts) {
+MinimalAction::ActOnForwardProtocolDeclaration(Scope *S, 
+  SourceLocation AtClassLoc, IdentifierInfo **IdentList, unsigned NumElts) {
   for (unsigned i = 0; i != NumElts; ++i) {
     TypeNameInfo *TI =
     new TypeNameInfo(1, IdentList[i]->getFETokenInfo<TypeNameInfo>());
index cda2ab5fe69441c7c04c48c51f1da5a24a9c8e16..eaf198fc92960c405c09fb12750898d0da36e320 100644 (file)
@@ -80,7 +80,7 @@ Parser::DeclTy *Parser::ParseObjCAtClassDeclaration(SourceLocation atLoc) {
   if (ExpectAndConsume(tok::semi, diag::err_expected_semi_after, "@class"))
     return 0;
   
-  return Actions.ObjcClassDeclaration(CurScope, atLoc,
+  return Actions.ActOnForwardClassDeclaration(CurScope, atLoc,
                                       &ClassNames[0], ClassNames.size());
 }
 
@@ -684,9 +684,9 @@ Parser::DeclTy *Parser::ParseObjCMethodDecl(tok::TokenKind mType,
       methodAttrs = ParseAttributes();
       
     Selector Sel = ObjcGetKeywordSelector(KeyIdents);
-    return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, Sel, 
-                                              &KeyTypes[0], &ArgNames[0],
-                                             methodAttrs, MethodImplKind);
+    return Actions.ActOnMethodDeclaration(mLoc, mType, ReturnType, Sel, 
+                                          &KeyTypes[0], &ArgNames[0],
+                                          methodAttrs, MethodImplKind);
   } else if (!selIdent) {
     Diag(Tok, diag::err_expected_ident); // missing selector name.
   }
@@ -695,8 +695,8 @@ Parser::DeclTy *Parser::ParseObjCMethodDecl(tok::TokenKind mType,
     methodAttrs = ParseAttributes();
 
   Selector Sel = ObjcGetUnarySelector(selIdent);
-  return Actions.ObjcBuildMethodDeclaration(mLoc, mType, ReturnType, Sel, 
-                                            0, 0, methodAttrs, MethodImplKind);
+  return Actions.ActOnMethodDeclaration(mLoc, mType, ReturnType, Sel, 
+                                        0, 0, methodAttrs, MethodImplKind);
 }
 
 ///   objc-protocol-refs:
@@ -866,9 +866,9 @@ Parser::DeclTy *Parser::ParseObjCAtProtocolDeclaration(SourceLocation AtLoc) {
       return 0;
   }
   if (ProtocolRefs.size() > 0)
-    return Actions.ObjcForwardProtocolDeclaration(CurScope, AtLoc,
-                                                  &ProtocolRefs[0], 
-                                                  ProtocolRefs.size());
+    return Actions.ActOnForwardProtocolDeclaration(CurScope, AtLoc,
+                                                   &ProtocolRefs[0], 
+                                                   ProtocolRefs.size());
   // Last, and definitely not least, parse a protocol declaration.
   if (Tok.getKind() == tok::less) {
     if (ParseObjCProtocolReferences(ProtocolRefs))
index e9dc4d0cb2c41d086ff13dd976522ca651b93617..6e87331b966e43a4d8a7c2ea2a814e87b431ebf2 100644 (file)
@@ -415,19 +415,19 @@ public:
                                                   IdentifierInfo *CatName,
                                                   SourceLocation CatLoc);
   
-  virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
-                                       IdentifierInfo **IdentList,
-                                       unsigned NumElts);
-  
-  virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S, 
-                                                 SourceLocation AtProtocolLoc,
-                                                 IdentifierInfo **IdentList,
-                                                 unsigned NumElts);
+  virtual DeclTy *ActOnForwardClassDeclaration(Scope *S, SourceLocation Loc,
+                                               IdentifierInfo **IdentList,
+                                               unsigned NumElts);
+  
+  virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S, 
+                                                  SourceLocation AtProtocolLoc,
+                                                  IdentifierInfo **IdentList,
+                                                  unsigned NumElts);
 
   virtual void ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl, 
                                     DeclTy **allMethods, unsigned allNum);
   
-  virtual DeclTy *ObjcBuildMethodDeclaration(SourceLocation MethodLoc, 
+  virtual DeclTy *ActOnMethodDeclaration(SourceLocation MethodLoc, 
     tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
     // optional arguments. The number of types/arguments is obtained
     // from the Sel.getNumArgs().
index 82c4596022d90187a4dcc7005a5d283d88bc1536..69e8b832a577e088c4aeb0ff5b9e63634cc9bad4 100644 (file)
@@ -1006,10 +1006,10 @@ Sema::DeclTy *Sema::ObjcStartProtoInterface(Scope* S,
   return PDecl;
 }
 
-/// ObjcForwardProtocolDeclaration - 
+/// ActOnForwardProtocolDeclaration - 
 /// Scope will always be top level file scope. 
 Action::DeclTy *
-Sema::ObjcForwardProtocolDeclaration(Scope *S, SourceLocation AtProtocolLoc,
+Sema::ActOnForwardProtocolDeclaration(Scope *S, SourceLocation AtProtocolLoc,
         IdentifierInfo **IdentList, unsigned NumElts) {
   ObjcForwardProtocolDecl *FDecl = new ObjcForwardProtocolDecl(AtProtocolLoc, 
                                                                NumElts);
@@ -1343,11 +1343,12 @@ void Sema::ImplCategoryMethodsVsIntfMethods(ObjcCategoryImplDecl *CatImplDecl,
          CatClassDecl->getCatName()->getName());
 }
 
-/// ObjcClassDeclaration - 
+/// ActOnForwardClassDeclaration - 
 /// Scope will always be top level file scope. 
 Action::DeclTy *
-Sema::ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
-                           IdentifierInfo **IdentList, unsigned NumElts) {
+Sema::ActOnForwardClassDeclaration(Scope *S, SourceLocation AtClassLoc,
+                                   IdentifierInfo **IdentList, unsigned NumElts) 
+{
   ObjcClassDecl *CDecl = new ObjcClassDecl(AtClassLoc, NumElts);
 
   for (unsigned i = 0; i != NumElts; ++i) {
@@ -1750,7 +1751,7 @@ void Sema::ObjcAddMethodsToClass(Scope* S, DeclTy *ClassDecl,
   return;
 }
 
-Sema::DeclTy *Sema::ObjcBuildMethodDeclaration(SourceLocation MethodLoc, 
+Sema::DeclTy *Sema::ActOnMethodDeclaration(SourceLocation MethodLoc, 
     tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
     // optional arguments. The number of types/arguments is obtained
     // from the Sel.getNumArgs().
index 6389e5fbc4b52a5bf259edca2edaf14c4c7a7ad6..314ed3ea3cf698d8d382b2bd0ea6ae5b1523a2b3 100644 (file)
                08FB7793FE84155DC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
                        projectDirPath = "";
index 73580badd8c3cfdfd1adb755162cfd3fc9584c2c..f353dff24e436dcb9eb7e7fd7ae806657a357cd4 100644 (file)
@@ -476,7 +476,7 @@ public:
                                                   SourceLocation CatLoc) {
     return 0;
   }  
-  virtual DeclTy *ObjcBuildMethodDeclaration(SourceLocation MethodLoc, 
+  virtual DeclTy *ActOnMethodDeclaration(SourceLocation MethodLoc, 
     tok::TokenKind MethodType, TypeTy *ReturnType, Selector Sel,
     // optional arguments. The number of types/arguments is obtained
     // from the Sel.getNumArgs().
@@ -500,26 +500,20 @@ public:
     SourceLocation lbrac, SourceLocation rbrac, ExprTy **ArgExprs) {
     return 0;
   }
-  virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
-                                       IdentifierInfo **IdentList,
-                                       unsigned NumElts) {
+  virtual DeclTy *ActOnForwardClassDeclaration(Scope *S,
+                                               SourceLocation AtClassLoc,
+                                               IdentifierInfo **IdentList,
+                                               unsigned NumElts) {
     return 0;
   }
   
-  virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S, 
-                                                 SourceLocation AtProtocolLoc,
-                                                 IdentifierInfo **IdentList,
-                                                 unsigned NumElts) {
+  virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S, 
+                                                  SourceLocation AtProtocolLoc,
+                                                  IdentifierInfo **IdentList,
+                                                  unsigned NumElts) {
     return 0;
   }
   
-  virtual void ObjCStartCategoryInterface() { // FIXME
-    return;
-  }
-  virtual void ObjCFinishInterface() {
-    return;
-  }
-    
   //===----------------------- Obj-C Expressions --------------------------===//
   virtual ExprResult ParseObjCStringLiteral(ExprTy *string) {
     return 0;
@@ -555,14 +549,15 @@ public:
   /// they are removed from the IdentifierInfo::FETokenInfo field.
   virtual void PopScope(SourceLocation Loc, Scope *S);
   
-  virtual DeclTy *ObjcClassDeclaration(Scope *S, SourceLocation AtClassLoc,
-                                       IdentifierInfo **IdentList,
-                                       unsigned NumElts);
+  virtual DeclTy *ActOnForwardClassDeclaration(Scope *S, 
+                                               SourceLocation AtClassLoc,
+                                               IdentifierInfo **IdentList,
+                                               unsigned NumElts);
   
-  virtual DeclTy *ObjcForwardProtocolDeclaration(Scope *S, 
-                                                 SourceLocation AtProtocolLoc,
-                                                 IdentifierInfo **IdentList,
-                                                 unsigned NumElts);
+  virtual DeclTy *ActOnForwardProtocolDeclaration(Scope *S, 
+                                                  SourceLocation AtProtocolLoc,
+                                                  IdentifierInfo **IdentList,
+                                                  unsigned NumElts);
    
   virtual DeclTy *ObjcStartClassInterface(Scope* S, SourceLocation AtInterafceLoc,
                     IdentifierInfo *ClassName, SourceLocation ClassLoc,