[PATCH] D50250: [clang][ubsan] Implicit Conversion Sanitizer - integer sign change - clang part
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 5 07:51:46 PDT 2018
lebedev.ri added inline comments.
================
Comment at: lib/CodeGen/CGExprScalar.cpp:1129-1130
+ return;
+ }
+ // That's it. We can't rule out any more cases with the data we have.
----------------
Actually, after messing with souper a little, if we are converting from *larger* *signed* type,
then the truncation check is sufficient already.
https://godbolt.org/g/DLVCy8
https://rise4fun.com/Alive/u2h
So it *seems* only the `unsigned int -> signed char` case is problematic.
Repository:
rC Clang
https://reviews.llvm.org/D50250
More information about the cfe-commits
mailing list