flow: fix scope hooks for for loop
commitf7d27a9db0f500fa24ebbbf76225ac10917a7bc3
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 11 Sep 2023 10:20:08 +0000 (11 13:20 +0300)
committerDan Carpenter <dan.carpenter@linaro.org>
Mon, 11 Sep 2023 10:20:08 +0000 (11 13:20 +0300)
tree5d6192d7492e6ef5a8310dd2daa2a64d1f1d200b
parente3dae12ac5b6f3ee2ae2a6ff62fb4c66291869fa
flow: fix scope hooks for for loop

In a for loop you can have stuff like:

for (int i = 0; i < 10; i++) {
...
}

Smatch was creating a scope around the curly braces but there also needs
to be a scope around the whole for loop.  Otherwise the i is put into the
outer scope instead of the for loop scope.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
smatch_flow.c