aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/Comment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/Comment.cpp')
-rw-r--r--clang/lib/AST/Comment.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/lib/AST/Comment.cpp b/clang/lib/AST/Comment.cpp
index ce90abf5..5e6a7de 100644
--- a/clang/lib/AST/Comment.cpp
+++ b/clang/lib/AST/Comment.cpp
@@ -294,6 +294,12 @@ void DeclInfo::fill() {
Kind = ClassKind;
break;
case Decl::Var:
+ if (const VarTemplateDecl *VTD =
+ cast<VarDecl>(CommentDecl)->getDescribedVarTemplate()) {
+ TemplateKind = TemplateSpecialization;
+ TemplateParameters = VTD->getTemplateParameters();
+ }
+ LLVM_FALLTHROUGH;
case Decl::Field:
case Decl::EnumConstant:
case Decl::ObjCIvar:
@@ -305,6 +311,15 @@ void DeclInfo::fill() {
TSI = PD->getTypeSourceInfo();
Kind = VariableKind;
break;
+ case Decl::VarTemplate: {
+ const VarTemplateDecl *VTD = cast<VarTemplateDecl>(CommentDecl);
+ Kind = VariableKind;
+ TemplateKind = Template;
+ TemplateParameters = VTD->getTemplateParameters();
+ if (const VarDecl *VD = VTD->getTemplatedDecl())
+ TSI = VD->getTypeSourceInfo();
+ break;
+ }
case Decl::Namespace:
Kind = NamespaceKind;
break;