Check if dereferencing an object that doesn't have unique ownership
| 1495 | |
| 1496 | // Check if dereferencing an object that doesn't have unique ownership |
| 1497 | static bool derefShared(const Token* tok) |
| 1498 | { |
| 1499 | if (!tok) |
| 1500 | return false; |
| 1501 | if (!tok->isUnaryOp("*") && tok->str() != "[" && tok->str() != ".") |
| 1502 | return false; |
| 1503 | if (tok->str() == "." && tok->originalName() != "->") |
| 1504 | return false; |
| 1505 | const Token* ptrTok = tok->astOperand1(); |
| 1506 | return !hasUniqueOwnership(ptrTok); |
| 1507 | } |
| 1508 | |
| 1509 | ValueFlow::Value ValueFlow::getLifetimeObjValue(const Token *tok, bool inconclusive) |
| 1510 | { |
no test coverage detected