<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/100502>100502</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[libc++][test] Bogus loops in time.cal.ymdlast.nonmembers/comparisons.pass.cpp
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc++
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
StephanTLavavej
</td>
</tr>
</table>
<pre>
Recently introduced by @mordante's #98169.
MSVC's `/analyze` complains:
```
D:\GitHub\STL\llvm-project\libcxx\test\std\time\time.cal\time.cal.ymdlast\time.cal.ymdlast.nonmembers\comparisons.pass.cpp(62) : warning C6294: Ill-defined for-loop. Loop body not executed.
D:\GitHub\STL\llvm-project\libcxx\test\std\time\time.cal\time.cal.ymdlast\time.cal.ymdlast.nonmembers\comparisons.pass.cpp(63) : warning C6294: Ill-defined for-loop. Loop body not executed.
```
This warning is *usually* a nuisance (complaining about loops that intentionally perform no iterations; calling them "ill-defined" isn't great either), but in this case it found actually-squirrely code :chipmunk: :
https://github.com/llvm/llvm-project/blob/7e7a9069d4240d2ae619cb50eba09f948c537ce3/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/comparisons.pass.cpp#L61-L68
I'm not sure what this code was intended to be doing. It appears that "same month, different years" previously looped from 1000 to 2000. Perhaps 1000 * 1000 = 1 million nested iterations was excessive, and the code should be looping from (say) 1000 to 1020?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMlUtvrDYUxz-NZ3MUZA7vBYtkRrSRUqlqou4NPjP41tjUNpPQT18ZcpNR2s2VuqiE8Pu8_j-D8F5dDFHLigdWnA5iCaN17XOgeRTm5UlcxZW-HXor1_Y3GsgEvYIywVm5DCShX4HlfLJOChOIYeWBYdbUadkkjJ8Yv9_fvzz_ftxXS86wE0bo9S9iJYfBTrMWyniW3d-eiBv3Zxue4nJx_Em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