[PATCH] Unify the way we report overflow in increment/decrement operator.
Alexey Samsonov
vonosmas at gmail.com
Tue Mar 10 15:25:42 PDT 2015
Hi rsmith,
Make sure signed overflow in "x--" is checked with
llvm.ssub.with.overflow intrinsic and is reported as:
"-2147483648 - 1 cannot be represented in type 'int'"
instead of:
"-2147483648 + -1 cannot be represented in type 'int'"
, like we do for unsigned overflow.
http://reviews.llvm.org/D8236
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGen/integer-overflow.c
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8236.21650.patch
Type: text/x-patch
Size: 4856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150310/9f1d15f1/attachment.bin>
More information about the cfe-commits
mailing list