From 7daabbd5d0c30054452d582402ff43db51688970 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 27 Apr 2014 22:53:03 +0000 Subject: [Index/DocComments] When cloning a full comment, pick the template parameters from the original FullComment, if the parameters are not already set (e.g. because it is a typedef). Fixes crash of rdar://16128173 llvm-svn: 207382 --- clang/lib/AST/ASTContext.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'clang/lib/AST/ASTContext.cpp') diff --git a/clang/lib/AST/ASTContext.cpp b/clang/lib/AST/ASTContext.cpp index 8a60bebd57a..84abda2dea6 100644 --- a/clang/lib/AST/ASTContext.cpp +++ b/clang/lib/AST/ASTContext.cpp @@ -422,6 +422,8 @@ comments::FullComment *ASTContext::cloneFullComment(comments::FullComment *FC, ThisDeclInfo->IsFilled = false; ThisDeclInfo->fill(); ThisDeclInfo->CommentDecl = FC->getDecl(); + if (!ThisDeclInfo->TemplateParameters) + ThisDeclInfo->TemplateParameters = FC->getDeclInfo()->TemplateParameters; comments::FullComment *CFC = new (*this) comments::FullComment(FC->getBlocks(), ThisDeclInfo); -- cgit v1.2.3