| 1336 | } |
| 1337 | |
| 1338 | CXChildVisitResult Visitor::buildCXXBaseSpecifier(CXCursor cursor) |
| 1339 | { |
| 1340 | auto currentContext = m_parentContext->context; |
| 1341 | |
| 1342 | bool virtualInherited = clang_isVirtualBase(cursor); |
| 1343 | Declaration::AccessPolicy access = CursorKindTraits::kdevAccessPolicy(clang_getCXXAccessSpecifier(cursor)); |
| 1344 | |
| 1345 | auto classDeclCursor = clang_getCursorReferenced(cursor); |
| 1346 | auto decl = findDeclaration(classDeclCursor); |
| 1347 | if (!decl) { |
| 1348 | // this happens for templates with template-dependent base classes e.g. - dunno whether we can/should do more here |
| 1349 | clangDebug() << "failed to find declaration for base specifier:" << clang_getCursorDisplayName(cursor); |
| 1350 | return CXChildVisit_Recurse; |
| 1351 | } |
| 1352 | |
| 1353 | DUChainWriteLocker lock; |
| 1354 | contextImportDecl(currentContext, decl); |
| 1355 | auto classDecl = dynamic_cast<ClassDeclaration*>(currentContext->owner()); |
| 1356 | Q_ASSERT(classDecl); |
| 1357 | |
| 1358 | classDecl->addBaseClass({decl->indexedType(), access, virtualInherited}); |
| 1359 | return CXChildVisit_Recurse; |
| 1360 | } |
| 1361 | |
| 1362 | template<bool IsInClass> |
| 1363 | CXChildVisitResult Visitor::buildTypeAliasTemplateDecl(CXCursor cursor) |
no test coverage detected