diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-08-30 20:53:29 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-08-30 20:53:29 +0000 |
commit | cda2a146d1fcf3f499a1aa535377fb332e918bd5 (patch) | |
tree | 79d15bba2b8ecd0b796950556b61b94f6b4b23f5 /unittests/VMCore/MetadataTest.cpp | |
parent | 2ac6b0185466024e306de142623b803565a1c526 (diff) |
Fix C++0x narrowing errors when char is unsigned.
In the case of EDInstInfo, this would actually cause a bug when -1 became 255
and was then compared >=0 in llvm-mc/Disassembler.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/VMCore/MetadataTest.cpp')
-rw-r--r-- | unittests/VMCore/MetadataTest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/unittests/VMCore/MetadataTest.cpp b/unittests/VMCore/MetadataTest.cpp index 0b2c012eda..12ac2e704c 100644 --- a/unittests/VMCore/MetadataTest.cpp +++ b/unittests/VMCore/MetadataTest.cpp @@ -63,7 +63,7 @@ TEST_F(MDStringTest, PrintingSimple) { // Test printing of MDString with non-printable characters. TEST_F(MDStringTest, PrintingComplex) { - char str[5] = {0, '\n', '"', '\\', -1}; + char str[5] = {0, '\n', '"', '\\', (char)-1}; MDString *s = MDString::get(Context, StringRef(str+0, 5)); std::string Str; raw_string_ostream oss(Str); |