Go to file
Justin Bogner e46d3796fc LowerSwitch: Avoid some undefined behaviour
When a case of INT64_MIN was followed by a case that was greater than
zero, we were overflowing a signed integer here. Since we've sorted
the cases here anyway (and thus currentValue must be greater than
nextValue) it's simple enough to avoid this by using addition rather
than subtraction.

Found by UBSAN on existing tests.

llvm-svn: 240201
2015-06-20 00:28:25 +00:00
clang [modules] Refactor and slightly simplify class definition merging. 2015-06-20 00:22:34 +00:00
clang-tools-extra clang-tidy: Remove an unused private field. NFC 2015-06-18 04:15:04 +00:00
compiler-rt Add -flto to clang flags for cfi tests. 2015-06-19 19:48:40 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Use a more accurate implementation for exp 2015-05-13 03:55:09 +00:00
libcxx Fix illegal chars that snuck into <memory> 2015-06-19 19:32:06 +00:00
libcxxabi fallback_malloc: silence conversion warning (NFC) 2015-06-03 17:25:35 +00:00
libunwind Code cleanup: Reindent statements. 2015-05-30 14:00:39 +00:00
lld COFF: Take reference to argument vector using std::vector::data() instead of operator[](0). 2015-06-19 22:40:05 +00:00
lldb Fix the MacOSX build to include the Mips64 ABI plug-in. 2015-06-19 20:08:36 +00:00
llgo [llgo] cmd/llgoi: use line editor 2015-05-23 15:16:09 +00:00
llvm LowerSwitch: Avoid some undefined behaviour 2015-06-20 00:28:25 +00:00
openmp Have CMake error out on Windows when user wants OMPT support 2015-06-17 15:43:34 +00:00
polly Fix the clang -Werror build (-Wbraced-scalar-init) 2015-06-19 20:07:18 +00:00