aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorJames Henderson <jh7370@my.bristol.ac.uk>2018-10-24 13:16:16 +0000
committerJames Henderson <jh7370@my.bristol.ac.uk>2018-10-24 13:16:16 +0000
commit5b2e968264b4bd80e4ba0650cdd7e0e56b0f8cdd (patch)
treed821e700fbc7dff35afc1cc7cfed9bab0f84652d /clang/lib/CodeGen/CodeGenModule.cpp
parent84cc11073255b36a08bea594d6e4946b7c782b54 (diff)
downloadllvm-5b2e968264b4bd80e4ba0650cdd7e0e56b0f8cdd.zip
llvm-5b2e968264b4bd80e4ba0650cdd7e0e56b0f8cdd.tar.gz
llvm-5b2e968264b4bd80e4ba0650cdd7e0e56b0f8cdd.tar.bz2
Fix llvm-strings crash for negative char values
On Windows at least, llvm-strings was crashing if it encountered bytes that mapped to negative chars, as it was passing these into std::isgraph and std::isblank functions, resulting in undefined behaviour. On debug builds using MSVC, these functions verfiy that the value passed in is representable as an unsigned char. Since the char is promoted to an int, a value greater than 127 would turn into a negative integer value, and fail the check. Using the llvm::isPrint function is sufficient to solve the issue. Reviewed by: ruiu, mstorsjo Differential Revision: https://reviews.llvm.org/D53509 llvm-svn: 345137
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions