| 238 | } |
| 239 | |
| 240 | static bool hasOverloadedAssignment(const Token* tok, bool& inconclusive) |
| 241 | { |
| 242 | inconclusive = false; |
| 243 | if (tok->isC()) |
| 244 | return false; |
| 245 | if (const ValueType* vt = tok->valueType()) { |
| 246 | if (vt->pointer && !Token::simpleMatch(tok->astParent(), "*")) |
| 247 | return false; |
| 248 | if (vt->container && vt->container->stdStringLike) |
| 249 | return true; |
| 250 | if (vt->typeScope) |
| 251 | return std::any_of(vt->typeScope->functionList.begin(), vt->typeScope->functionList.end(), [](const Function& f) { // TODO: compare argument type |
| 252 | return f.name() == "operator="; |
| 253 | }); |
| 254 | return false; |
| 255 | } |
| 256 | inconclusive = true; |
| 257 | return true; |
| 258 | } |
| 259 | |
| 260 | static bool isMemberAssignment(const Token* tok, const Token*& rhs, const Settings& settings) |
| 261 | { |
no test coverage detected