rikardfalkeborn 13ffefc8b8 Valueflow: Fix right shift with more than 31 bits (#1553)
When comparing if the shift is large enough to make the result zero, use
an unsigned long long to make sure the result fits. Also, a check that
avoids setting the value if the shift is equal to or larger than the
number of bits in the operand (this is undefined behaviour). Finally,
add a check to make sure the calculated value is not too large to store.

Add test cases to cover this.

This was detected by an MSVC warning.

valueflow.cpp(1350): warning C4334: '<<' : result of 32-bit shift implicitly
                     converted to 64 bits (was 64-bit shift intended?)
2019-01-01 14:15:50 +01:00
..
2017-06-05 13:23:00 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-05-15 16:37:40 +02:00
2018-07-15 23:05:48 +02:00
2018-12-17 18:54:32 +01:00
2018-10-13 18:20:31 +02:00
2018-11-21 08:39:21 +01:00
2018-05-15 16:37:40 +02:00
2018-12-21 13:55:24 +01:00
2018-12-21 13:55:24 +01:00
2018-06-16 22:28:14 +02:00
2018-12-23 12:42:18 +01:00
2018-12-30 16:23:25 +01:00