opendlang / opend

Boost Software License 1.0
89 stars 20 forks source link

foreach(int idx, v; arr) could do runtime bounds check #70

Open adamdruppe opened 6 months ago

adamdruppe commented 6 months ago

if arr is static length it does VRP

if it is dynamic length i could perhaps do a bound check before entering the loop to ensure it is < int.max

search for

deprecation(fs.loc, "foreach: loop index implicitly converted from `size_t` t

statementsem.d to find the hook