The code for range-based for-loops makes a bad integer literal expression which has a mis-match between the size of the literal and the integer type. This causes an assert to be thrown when IsIntegerConstant() is called on it.<div>
For this patch,</div><div><br></div><div>1) the assert that checks bit width is copied from IsIntegerConstant() into the integer literal constructor.</div><div>2) a new static function was written so that it automatically selects the correct size integer and returns a proper integer literal</div>
<div>3) the range-based for-loops now use the function in #2 to get the right integer literal</div>