From 02adcaa2a1caacc7cddcc637ddc90ecc6c20cb2f Mon Sep 17 00:00:00 2001 From: chrchr Date: Mon, 7 Aug 2023 10:49:39 +0200 Subject: [PATCH] Adjust indirect --- lib/astutils.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/astutils.cpp b/lib/astutils.cpp index 982b74aacd2..19c76f558ea 100644 --- a/lib/astutils.cpp +++ b/lib/astutils.cpp @@ -2346,6 +2346,10 @@ bool isVariableChangedByFunctionCall(const Token *tok, int indirect, const Setti const bool addressOf = tok->astParent() && tok->astParent()->isUnaryOp("&"); if (addressOf) indirect++; + + const bool deref = tok->astParent() && tok->astParent()->isUnaryOp("*"); + if (deref) + indirect--; int argnr; tok = getTokenArgumentFunction(tok, argnr);