[cfe-commits] Patch - Fix range-based for-loop so that it forms proper integer literals
Richard Trieu
rtrieu at google.com
Fri Apr 22 14:26:10 PDT 2011
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.
For this patch,
1) the assert that checks bit width is copied from IsIntegerConstant() into
the integer literal constructor.
2) a new static function was written so that it automatically selects the
correct size integer and returns a proper integer literal
3) the range-based for-loops now use the function in #2 to get the right
integer literal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110422/36d766bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IntegerLiteral.patch
Type: text/x-patch
Size: 4017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110422/36d766bd/attachment.bin>
More information about the cfe-commits
mailing list