diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-27 22:53:03 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-04-27 22:53:03 +0000 |
commit | 7daabbd5d0c30054452d582402ff43db51688970 (patch) | |
tree | 32c58c26c7e2d8c9042e11c67d5d67e6294d6403 /clang/lib/AST/ASTContext.cpp | |
parent | 466d66358ddcd4eb480d1d2dd82ad1d450a52f4c (diff) | |
download | bcm5719-llvm-7daabbd5d0c30054452d582402ff43db51688970.tar.gz bcm5719-llvm-7daabbd5d0c30054452d582402ff43db51688970.zip |
[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
Diffstat (limited to 'clang/lib/AST/ASTContext.cpp')
-rw-r--r-- | clang/lib/AST/ASTContext.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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); |