Tok.setKind(tok::eof);
}
+ /// \brief Clear and free the cached objc methods.
+ void clearLateParsedObjCMethods();
+
/// \brief Handle the annotation token produced for #pragma unused(...)
void HandlePragmaUnused();
// missing @implementation
Diag(atEnd.getBegin(), diag::err_expected_implementation);
- LateParsedObjCMethods.clear();
+ clearLateParsedObjCMethods();
ObjCImpDecl = 0;
return Actions.BuildDeclaratorGroup(
DeclsInGroup.data(), DeclsInGroup.size(), false);
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 ';'
///
it != LateParsedTemplateMap.end(); ++it)
delete it->second;
+ clearLateParsedObjCMethods();
+
// Remove the pragma handlers we installed.
PP.RemovePragmaHandler(AlignHandler.get());
AlignHandler.reset();