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

Method allocateOwnIndex

kdevplatform/language/duchain/declaration.cpp:354–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

352}
353
354void Declaration::allocateOwnIndex()
355{
356 ///@todo Fix multithreading stuff with template instantiation, preferably using some internal mutexes
357// if(context() && (!context()->isAnonymous() && !d_func()->m_anonymousInContext)) {
358// ENSURE_CAN_WRITE
359// }
360
361 Q_ASSERT(m_topContext);
362
363 m_indexInTopContext = m_topContext->m_dynamicData->allocateDeclarationIndex(this,
364 d_func()->m_anonymousInContext || !context() ||
365 context()->isAnonymous());
366 Q_ASSERT(m_indexInTopContext);
367
368 if (!m_topContext->m_dynamicData->declarationForIndex(m_indexInTopContext))
369 qFatal("Could not re-retrieve declaration\nindex: %d", m_indexInTopContext);
370}
371
372const Declaration* Declaration::logicalDeclaration(const TopDUContext* topContext) const
373{

Callers

nothing calls this directly

Calls 4

contextFunction · 0.85
declarationForIndexMethod · 0.80
isAnonymousMethod · 0.45

Tested by

no test coverage detected