]> granicus.if.org Git - llvm/commitdiff
Add static_cast to silence -Wc++11-narrowing.
authorDaniel Jasper <djasper@google.com>
Sat, 25 Feb 2017 07:53:36 +0000 (07:53 +0000)
committerDaniel Jasper <djasper@google.com>
Sat, 25 Feb 2017 07:53:36 +0000 (07:53 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296249 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/DebugInfo/PDB/BinaryStreamTest.cpp

index ad1e6db6e073c205920c1fe5ecbb473f2b42d5b0..e9e8ab8c973c7c1113268bb1babfd6b0620a77ef 100644 (file)
@@ -452,7 +452,7 @@ TEST_F(BinaryStreamTest, StreamReaderObject) {
 
   std::vector<Foo> Foos;
   Foos.push_back({-42, 42.42, 42});
-  Foos.push_back({100, 3.1415, -89});
+  Foos.push_back({100, 3.1415, static_cast<char>(-89)});
 
   const uint8_t *Bytes = reinterpret_cast<const uint8_t *>(&Foos[0]);