| 1249 | bool uniqueExprId{}; |
| 1250 | |
| 1251 | ExpressionAnalyzer(const Token* e, ValueFlow::Value val, const Settings& s) |
| 1252 | : SingleValueFlowAnalyzer(std::move(val), s), |
| 1253 | expr(e) |
| 1254 | { |
| 1255 | |
| 1256 | assert(e && e->exprId() != 0 && "Not a valid expression"); |
| 1257 | dependOnThis = exprDependsOnThis(expr); |
| 1258 | setupExprVarIds(expr); |
| 1259 | if (value.isSymbolicValue()) { |
| 1260 | dependOnThis |= exprDependsOnThis(value.tokvalue); |
| 1261 | setupExprVarIds(value.tokvalue); |
| 1262 | } |
| 1263 | uniqueExprId = |
| 1264 | expr->isUniqueExprId() && (Token::Match(expr, "%cop%") || !isVariableChanged(expr, 0, s)); |
| 1265 | } |
| 1266 | |
| 1267 | static bool nonLocal(const Variable* var, bool deref) { |
| 1268 | return !var || (!var->isLocal() && !var->isArgument()) || (deref && var->isArgument() && var->isPointer()) || |
nothing calls this directly
no test coverage detected