[llvm] r296249 - Add static_cast to silence -Wc++11-narrowing.

Daniel Jasper via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 23:53:36 PST 2017


Author: djasper
Date: Sat Feb 25 01:53:36 2017
New Revision: 296249

URL: http://llvm.org/viewvc/llvm-project?rev=296249&view=rev
Log:
Add static_cast to silence -Wc++11-narrowing.

Modified:
    llvm/trunk/unittests/DebugInfo/PDB/BinaryStreamTest.cpp

Modified: llvm/trunk/unittests/DebugInfo/PDB/BinaryStreamTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/DebugInfo/PDB/BinaryStreamTest.cpp?rev=296249&r1=296248&r2=296249&view=diff
==============================================================================
--- llvm/trunk/unittests/DebugInfo/PDB/BinaryStreamTest.cpp (original)
+++ llvm/trunk/unittests/DebugInfo/PDB/BinaryStreamTest.cpp Sat Feb 25 01:53:36 2017
@@ -452,7 +452,7 @@ TEST_F(BinaryStreamTest, StreamReaderObj
 
   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]);
 




More information about the llvm-commits mailing list