Minor clean up of objc's decl context stuff.
No change in functionality.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138742 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h
index f74a1e4..0925a10 100644
--- a/include/clang/Parse/Parser.h
+++ b/include/clang/Parse/Parser.h
@@ -513,7 +513,7 @@
explicit ObjCDeclContextSwitch(Parser &p) : P(p),
DC(p.getObjCDeclContext()) {
if (DC)
- P.Actions.ActOnObjCContainerFinishDefinition(DC);
+ P.Actions.ActOnObjCContainerFinishDefinition();
}
~ObjCDeclContextSwitch() {
if (DC)
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index f6d5edc..34c7012 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -1202,7 +1202,7 @@
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.
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 17c962e..97e8bb0 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -471,7 +471,6 @@
allMethods.data(), allMethods.size(),
allProperties.data(), allProperties.size(),
allTUVariables.data(), allTUVariables.size());
- Actions.ActOnObjCContainerFinishDefinition(CDecl);
}
/// Parse property attribute declarations.
@@ -1184,7 +1183,7 @@
= 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 @@
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 @@
ConsumeToken(); // the "end" identifier
if (ObjCImpDecl) {
Actions.ActOnAtEnd(getCurScope(), atEnd);
- Actions.ActOnObjCContainerFinishDefinition(ObjCImpDecl);
ObjCImpDecl = 0;
PendingObjCImpDecl.pop_back();
}
@@ -1420,7 +1418,6 @@
return Actions.ConvertDeclToDeclGroup(0);
Decl *ImpDecl = PendingObjCImpDecl.pop_back_val();
Actions.ActOnAtEnd(getCurScope(), SourceRange());
- Actions.ActOnObjCContainerFinishDefinition(ImpDecl);
return Actions.ConvertDeclToDeclGroup(ImpDecl);
}
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 2f2ba7f..e09896a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -7780,7 +7780,7 @@
Consumer.HandleTagDeclDefinition(Tag);
}
-void Sema::ActOnObjCContainerFinishDefinition(Decl *IDecl) {
+void Sema::ActOnObjCContainerFinishDefinition() {
// Exit this scope of this interface definition.
PopDeclContext();
}
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 9b6166b..11bcb4f 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -2242,6 +2242,7 @@
}
}
}
+ ActOnObjCContainerFinishDefinition();
}