MCPcopy Create free account
hub / github.com/KDE/kdevelop / findDeclaration

Method findDeclaration

plugins/clang/duchain/builder.cpp:1383–1395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1381//END build*
1382
1383DeclarationPointer Visitor::findDeclaration(CXCursor cursor) const
1384{
1385 const auto it = m_cursorToDeclarationCache.constFind(cursor);
1386 if (it != m_cursorToDeclarationCache.constEnd()) {
1387 return *it;
1388 }
1389
1390 // fallback, and cache result
1391 auto decl = ClangHelpers::findDeclaration(cursor, m_includes);
1392
1393 m_cursorToDeclarationCache.insert(cursor, decl);
1394 return decl;
1395}
1396
1397void Visitor::setIdTypeDecl(CXCursor typeCursor, IdentifiedType* idType) const
1398{

Callers

nothing calls this directly

Calls 4

findDeclarationFunction · 0.85
constEndMethod · 0.80
constFindMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected