khazem added a comment. This diff is a continuation of https://reviews.llvm.org/D14326, which was accepted for inclusion but has not been merged in for the past couple of months.
I added a small patch so that it rebases cleanly onto master: --- a/lib/AST/ASTImporter.cpp +++ b/lib/AST/ASTImporter.cpp @@ -2309,16 +2309,9 @@ bool ASTNodeImporter::ImportDefinition(EnumDecl *From, EnumDecl *To, TemplateParameterList *ASTNodeImporter::ImportTemplateParameterList( TemplateParameterList *Params) { - SmallVector<NamedDecl *, 4> ToParams; - ToParams.reserve(Params->size()); - for (TemplateParameterList::iterator P = Params->begin(), - PEnd = Params->end(); - P != PEnd; ++P) { - Decl *To = Importer.Import(*P); - if (!To) - return nullptr; - ToParams.push_back(cast<NamedDecl>(To)); - } + SmallVector<NamedDecl *, 4> ToParams(Params->size()); + if (ImportContainerChecked(*Params, ToParams)) + return nullptr; Expr *ToRequiresClause; if (Expr *const R = Params->getRequiresClause()) { One of the tests is currently failing with this patch. Specifically, there is a segfault at line 130 of test/ASTMerge/Inputs/exprs3.cpp. I'm working on getting this fixed now. https://reviews.llvm.org/D24878 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits