| 1136 | } |
| 1137 | |
| 1138 | Declaration* TopDUContext::usedDeclarationForIndex(unsigned int declarationIndex) const |
| 1139 | { |
| 1140 | ENSURE_CAN_READ |
| 1141 | if (declarationIndex & (1 << 31)) { |
| 1142 | //We use the highest bit to mark direct indices into the local declarations |
| 1143 | declarationIndex &= ~(1 << 31); //unset the highest bit |
| 1144 | return m_dynamicData->declarationForIndex(declarationIndex); |
| 1145 | } else if (declarationIndex < d_func()->m_usedDeclarationIdsSize()) |
| 1146 | return d_func()->m_usedDeclarationIds()[declarationIndex].declaration(this); |
| 1147 | else |
| 1148 | return nullptr; |
| 1149 | } |
| 1150 | |
| 1151 | int TopDUContext::indexForUsedDeclaration(Declaration* declaration, bool create) |
| 1152 | { |
no test coverage detected