Skip to content

Commit a03d710

Browse files
Update astutils.cpp
1 parent c0d6206 commit a03d710

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/astutils.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3426,6 +3426,11 @@ static ExprUsage getFunctionUsage(const Token* tok, int indirect, const Settings
34263426
if (ftok->variable()->type() && ftok->variable()->type()->classScope) {
34273427
const int nCtor = ftok->variable()->type()->classScope->numConstructors;
34283428
if (nCtor == 0)
3429+
if (indirect > 0) {
3430+
std::vector<const Variable*> argvar = getArgumentVars(ftok->astParent(), argnr);
3431+
if (argvar.size() == 1 && argvar[0]->valueType() && argvar[0]->valueType()->pointer == indirect)
3432+
return ExprUsage::NotUsed;
3433+
}
34293434
return ExprUsage::Used;
34303435
if (nCtor == 1) {
34313436
const Scope* scope = ftok->variable()->type()->classScope;

0 commit comments

Comments
 (0)