SuccessChanges

Summary

  1. [obj2yaml] - Stop triggering UB when dumping corrupted strings. (details)
Commit 4ec0b084389619442638d7d3563793f21d787501 by grimar
[obj2yaml] - Stop triggering UB when dumping corrupted strings.
We have a following code to find quote type:
if (isspace(S.front()) || isspace(S.back()))
...
Problem is that:
"int isspace( int ch ): The behavior is undefined if the value of ch is
not representable as unsigned char and is not equal to EOF."
(https://en.cppreference.com/w/cpp/string/byte/isspace)
This patch shows how this UB can be triggered and fixes an issue.
Differential revision: https://reviews.llvm.org/D69160
llvm-svn: 375404
The file was modifiedllvm/include/llvm/Support/YAMLTraits.h
The file was addedllvm/test/tools/obj2yaml/invalid-section-name.yaml