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

Method removeDeclaration

kdevplatform/language/duchain/ducontext.cpp:231–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231bool DUContextDynamicData::removeDeclaration(Declaration* declaration)
232{
233 const int idx = m_localDeclarations.indexOf(declaration);
234 if (idx != -1) {
235 Q_ASSERT(d_func()->m_localDeclarations()[idx].data(m_topContext) == declaration);
236 m_localDeclarations.remove(idx);
237 d_func_dynamic()->m_localDeclarationsList().remove(idx);
238 return true;
239 } else {
240 Q_ASSERT(d_func_dynamic()->m_localDeclarationsList().indexOf(LocalIndexedDeclaration(declaration)) == -1);
241 return false;
242 }
243}
244
245void DUContextDynamicData::addChildContext(DUContext* context)
246{

Callers 4

~DeclarationMethod · 0.45
setContextMethod · 0.45
setInSymbolTableMethod · 0.45

Calls 3

indexOfMethod · 0.45
dataMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected