| 1211 | } |
| 1212 | |
| 1213 | bool updateScope(const Token* endBlock, bool /*modified*/) const override { |
| 1214 | const Scope* scope = endBlock->scope(); |
| 1215 | if (!scope) |
| 1216 | return false; |
| 1217 | if (scope->type == ScopeType::eLambda) |
| 1218 | return value.isLifetimeValue(); |
| 1219 | if (scope->type == ScopeType::eIf || scope->type == ScopeType::eElse || scope->type == ScopeType::eWhile || |
| 1220 | scope->type == ScopeType::eFor) { |
| 1221 | if (value.isKnown() || value.isImpossible()) |
| 1222 | return true; |
| 1223 | if (value.isLifetimeValue()) |
| 1224 | return true; |
| 1225 | if (isConditional()) |
| 1226 | return false; |
| 1227 | const Token* condTok = getCondTokFromEnd(endBlock); |
| 1228 | std::set<nonneg int> varids2; |
| 1229 | std::transform(getVars().cbegin(), getVars().cend(), std::inserter(varids2, varids2.begin()), SelectMapKeys{}); |
| 1230 | return bifurcate(condTok, varids2, getSettings()); |
| 1231 | } |
| 1232 | |
| 1233 | return false; |
| 1234 | } |
| 1235 | |
| 1236 | private: |
| 1237 | ValuePtr<Analyzer> reanalyze(Token* tok, const std::string& msg) const override { |
nothing calls this directly
no test coverage detected