aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseObjc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r--lib/Parse/ParseObjc.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp
index 3cb2aaaec3..10c74ffdfd 100644
--- a/lib/Parse/ParseObjc.cpp
+++ b/lib/Parse/ParseObjc.cpp
@@ -1500,7 +1500,7 @@ Parser::ParseObjCAtEndDeclaration(SourceRange atEnd) {
// missing @implementation
Diag(atEnd.getBegin(), diag::err_expected_implementation);
- LateParsedObjCMethods.clear();
+ clearLateParsedObjCMethods();
ObjCImpDecl = 0;
return Actions.BuildDeclaratorGroup(
DeclsInGroup.data(), DeclsInGroup.size(), false);
@@ -1515,6 +1515,14 @@ Parser::DeclGroupPtrTy Parser::FinishPendingObjCActions() {
return Actions.ConvertDeclToDeclGroup(ImpDecl);
}
+void Parser::clearLateParsedObjCMethods() {
+ for (LateParsedObjCMethodContainer::iterator
+ I = LateParsedObjCMethods.begin(),
+ E = LateParsedObjCMethods.end(); I != E; ++I)
+ delete *I;
+ LateParsedObjCMethods.clear();
+}
+
/// compatibility-alias-decl:
/// @compatibility_alias alias-name class-name ';'
///