[clang][ExtractAPI] Add support for C++ member templates
Visit and serialize C++ fields by checking if a var template's context is a CXXRecordDecl in VisitVarTemplateDecl. Depends on D158027 Reviewed By: dang Differential Revision: https://reviews.llvm.org/D158029
This commit is contained in:
@@ -465,6 +465,11 @@ DeclarationFragmentsBuilder::getFragmentsForVarTemplate(const VarDecl *Var) {
|
||||
? Var->getTypeSourceInfo()->getType()
|
||||
: Var->getASTContext().getUnqualifiedObjCPointerType(Var->getType());
|
||||
|
||||
// Might be a member, so might be static.
|
||||
if (Var->isStaticDataMember())
|
||||
Fragments.append("static", DeclarationFragments::FragmentKind::Keyword)
|
||||
.appendSpace();
|
||||
|
||||
DeclarationFragments After;
|
||||
DeclarationFragments ArgumentFragment =
|
||||
getFragmentsForType(T, Var->getASTContext(), After);
|
||||
|
||||
Reference in New Issue
Block a user