]> granicus.if.org Git - clang/commitdiff
Minor clean up of objc's decl context stuff.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 29 Aug 2011 17:33:12 +0000 (17:33 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 29 Aug 2011 17:33:12 +0000 (17:33 +0000)
No change in functionality.

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

include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Parse/ParseObjc.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclObjC.cpp

index f74a1e48d7554af3b1ce172066b69ab06e80b6a3..0925a109fdbd837b16fc3f21b281816deb773816 100644 (file)
@@ -513,7 +513,7 @@ private:
     explicit ObjCDeclContextSwitch(Parser &p) : P(p), 
                DC(p.getObjCDeclContext()) {
       if (DC)
-        P.Actions.ActOnObjCContainerFinishDefinition(DC);
+        P.Actions.ActOnObjCContainerFinishDefinition();
     }
     ~ObjCDeclContextSwitch() {
       if (DC)
index f6d5edc4e482bbb752916d620ea4d4841aa39685..34c70125a73d04be63dcfe43cc782af4a0dfbbdb 100644 (file)
@@ -1202,7 +1202,7 @@ public:
   void ActOnTagFinishDefinition(Scope *S, Decl *TagDecl,
                                 SourceLocation RBraceLoc);
 
-  void ActOnObjCContainerFinishDefinition(Decl *IDecl);
+  void ActOnObjCContainerFinishDefinition();
 
   /// ActOnTagDefinitionError - Invoked when there was an unrecoverable
   /// error parsing the definition of a tag.
index 17c962e2b572585398a1426b7d588f8a8e144501..97e8bb0e436c2bdd6ed98cd93613836f4b12433f 100644 (file)
@@ -471,7 +471,6 @@ void Parser::ParseObjCInterfaceDeclList(tok::ObjCKeywordKind contextKey,
                      allMethods.data(), allMethods.size(),
                      allProperties.data(), allProperties.size(),
                      allTUVariables.data(), allTUVariables.size());
-  Actions.ActOnObjCContainerFinishDefinition(CDecl);
 }
 
 ///   Parse property attribute declarations.
@@ -1184,7 +1183,7 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
           = P.Actions.ActOnIvar(P.getCurScope(),
                                 FD.D.getDeclSpec().getSourceRange().getBegin(),
                                 FD.D, FD.BitfieldSize, visibility);
-        P.Actions.ActOnObjCContainerFinishDefinition(IDecl);
+        P.Actions.ActOnObjCContainerFinishDefinition();
         if (Field)
           AllIvarDecls.push_back(Field);
         return Field;
@@ -1206,7 +1205,7 @@ void Parser::ParseObjCClassInstanceVariables(Decl *interfaceDecl,
   SourceLocation RBraceLoc = MatchRHSPunctuation(tok::r_brace, LBraceLoc);
   Actions.ActOnObjCContainerStartDefinition(interfaceDecl);
   Actions.ActOnLastBitfield(RBraceLoc, AllIvarDecls);
-  Actions.ActOnObjCContainerFinishDefinition(interfaceDecl);
+  Actions.ActOnObjCContainerFinishDefinition();
   // Call ActOnFields() even if we don't have any decls. This is useful
   // for code rewriting tools that need to be aware of the empty list.
   Actions.ActOnFields(getCurScope(), atLoc, interfaceDecl,
@@ -1403,7 +1402,6 @@ Decl *Parser::ParseObjCAtEndDeclaration(SourceRange atEnd) {
   ConsumeToken(); // the "end" identifier
   if (ObjCImpDecl) {
     Actions.ActOnAtEnd(getCurScope(), atEnd);
-    Actions.ActOnObjCContainerFinishDefinition(ObjCImpDecl);
     ObjCImpDecl = 0;
     PendingObjCImpDecl.pop_back();
   }
@@ -1420,7 +1418,6 @@ Parser::DeclGroupPtrTy Parser::FinishPendingObjCActions() {
     return Actions.ConvertDeclToDeclGroup(0);
   Decl *ImpDecl = PendingObjCImpDecl.pop_back_val();
   Actions.ActOnAtEnd(getCurScope(), SourceRange());
-  Actions.ActOnObjCContainerFinishDefinition(ImpDecl);
   return Actions.ConvertDeclToDeclGroup(ImpDecl);
 }
 
index 2f2ba7f8e6d64ac68570e602a5c5087fb8a76a4c..e09896a60cabead75cac2096d6bc20e2487e6dd9 100644 (file)
@@ -7780,7 +7780,7 @@ void Sema::ActOnTagFinishDefinition(Scope *S, Decl *TagD,
   Consumer.HandleTagDeclDefinition(Tag);
 }
 
-void Sema::ActOnObjCContainerFinishDefinition(Decl *IDecl) {
+void Sema::ActOnObjCContainerFinishDefinition() {
   // Exit this scope of this interface definition.
   PopDeclContext();
 }
index 9b6166bc5b22e180e5a59027cb222d77105d186f..11bcb4f08304789c3d54b58e7b1273c06a6fe111 100644 (file)
@@ -2242,6 +2242,7 @@ void Sema::ActOnAtEnd(Scope *S, SourceRange AtEnd,
         }
     }
   }
+  ActOnObjCContainerFinishDefinition();
 }