Skip to content

Commit dda172d

Browse files
Update checkautovariables.cpp
1 parent 15a4f63 commit dda172d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/checkautovariables.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,8 @@ static bool isAutoVar(const Token *tok)
9999
} while (Token::Match(tok, "%name% .|::"));
100100
if (Token::Match(tok, "%name% ("))
101101
return false;
102+
if (tok->variable() && tok->variable()->isPointer())
103+
return false;
102104
}
103105
return true;
104106
}

0 commit comments

Comments
 (0)