validation: Check C99 for loop variables
commit0e91f8781701cd40bd02999ca699c511cb7655c1
authorEmily Maier <emily@emilymaier.net>
Wed, 4 May 2016 12:39:44 +0000 (4 08:39 -0400)
committerChristopher Li <sparse@chrisli.org>
Mon, 13 Feb 2017 01:34:43 +0000 (13 09:34 +0800)
tree77ac6ff0abaaaeebd3735b75e2c21bd46432c145
parent2ad59aaa5eaec421e9bbb7163e56ace4d388cfd5
validation: Check C99 for loop variables

Previously, sparse would generate incorrect code in the presence of a
C99 variable declaration inside the for statement, completely dropping
the code after the end of the for loop. Check that it's now behaving
correctly by entering a context and not leaving it at the end of the
loop.

Signed-off-by: Emily Maier <emily@emilymaier.net>
Signed-off-by: Christopher Li <sparse@chrisli.org>
validation/c99-for-loop.c [new file with mode: 0644]