| 1478 | } |
| 1479 | |
| 1480 | static bool hasUniqueOwnership(const Token* tok) |
| 1481 | { |
| 1482 | if (!tok) |
| 1483 | return false; |
| 1484 | const Variable* var = tok->variable(); |
| 1485 | if (var && var->isArray() && !var->isArgument()) |
| 1486 | return true; |
| 1487 | if (astIsPointer(tok)) |
| 1488 | return false; |
| 1489 | if (astIsUniqueSmartPointer(tok)) |
| 1490 | return true; |
| 1491 | if (astIsContainerOwned(tok)) |
| 1492 | return true; |
| 1493 | return false; |
| 1494 | } |
| 1495 | |
| 1496 | // Check if dereferencing an object that doesn't have unique ownership |
| 1497 | static bool derefShared(const Token* tok) |
no test coverage detected