extra: handle post op increment loops
commit5b213fd7c37f3baa9c1c75f4357248bb809a8d3c
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 29 Feb 2016 12:32:29 +0000 (29 15:32 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 29 Feb 2016 12:32:29 +0000 (29 15:32 +0300)
treefc1313afc2c995475d7c9b1bc7bc9ce27d2a6bcf
parente6f67e92f3a81e5f7a06e60b17477c77ec5ec287
extra: handle post op increment loops

Normally people do:

for (i = 0; i < 3; i++) {

}

But sometimes they do:

i = 0;
do {
blah();
} while (i++ < TIMEOUT);

Smatch handles all loops as a special case.  (This will change when
--two-passes is implemented properly).  We don't have a special case for
this so I have created it now.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch_extra.c
validation/sm_loops5.c [new file with mode: 0644]