| 1361 | |
| 1362 | template<bool IsInClass> |
| 1363 | CXChildVisitResult Visitor::buildTypeAliasTemplateDecl(CXCursor cursor) |
| 1364 | { |
| 1365 | auto aliasDecl = findEmbeddedTypeAlias(cursor); |
| 1366 | // NOTE: using aliasDecl here averts having to add a workaround to makeId() |
| 1367 | auto id = makeId(aliasDecl); |
| 1368 | // create template context to prevent leaking child template params |
| 1369 | auto context = createContext<CXCursor_TypeAliasTemplateDecl, DUContext::Template>(cursor, QualifiedIdentifier(id)); |
| 1370 | using DeclType = typename DeclType<CXCursor_TypeAliasDecl, false, IsInClass>::Type; |
| 1371 | createDeclaration<CXCursor_TypeAliasDecl, DeclType>(aliasDecl, id, context); |
| 1372 | CurrentContext newParent(context, m_parentContext->keepAliveContexts); |
| 1373 | PushValue<CurrentContext*> pushCurrent(m_parentContext, &newParent); |
| 1374 | clang_visitChildren(cursor, [] (CXCursor cursor, CXCursor parent, CXClientData data) { |
| 1375 | // NOTE: immediately recurse into embedded alias decl |
| 1376 | return clang_getCursorKind(cursor) == CXCursor_TypeAliasDecl ? |
| 1377 | CXChildVisit_Recurse : visitCursor(cursor, parent, data); |
| 1378 | }, this); |
| 1379 | return CXChildVisit_Continue; |
| 1380 | } |
| 1381 | //END build* |
| 1382 | |
| 1383 | DeclarationPointer Visitor::findDeclaration(CXCursor cursor) const |
nothing calls this directly
no test coverage detected