BEGIN helpers HACK: current alias type template machinery is badly broken wrt spelling location, work around this by adjusting all references to point to child type alias node with proper location TODO: investigate upstream implementation of CXCursor_TypeAliasTemplateDecl
| 66 | // type alias node with proper location |
| 67 | // TODO: investigate upstream implementation of CXCursor_TypeAliasTemplateDecl |
| 68 | CXCursor findEmbeddedTypeAlias(CXCursor aliasTemplate) |
| 69 | { |
| 70 | auto result = clang_getNullCursor(); |
| 71 | clang_visitChildren(aliasTemplate, [] (CXCursor cursor, CXCursor, CXClientData data) { |
| 72 | if (clang_getCursorKind(cursor) == CXCursor_TypeAliasDecl) { |
| 73 | auto res = reinterpret_cast<CXCursor*>(data); |
| 74 | *res = cursor; |
| 75 | return CXChildVisit_Break; |
| 76 | } |
| 77 | return CXChildVisit_Continue; |
| 78 | }, &result); |
| 79 | return result; |
| 80 | } |
| 81 | |
| 82 | /** |
| 83 | * Find the cursor that cursor @p cursor references |
no outgoing calls
no test coverage detected