| 229 | } |
| 230 | |
| 231 | bool 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 | |
| 245 | void DUContextDynamicData::addChildContext(DUContext* context) |
| 246 | { |
no test coverage detected