llvm.org GIT mirror llvm / 83e36d9
Fix memory leak in unit test of Bitcode/BitReaderTest.cpp Fixes obvious memory leak in test TestForEofAfterReadFailureOnDataStreamer. Also removes constexpr use from same test. Patch by Karl Schimpf. Differential Revision: http://reviews.llvm.org/D11735 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243904 91177308-0d34-0410-b5e6-96231b3b80d8 Derek Schuff 4 years ago
1 changed file(s) with 3 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
117117 // Jump to two bytes before end of stream.
118118 Cursor.JumpToBit((InputSize - 4) * CHAR_BIT);
119119 // Try to read 4 bytes when only 2 are present, resulting in error value 0.
120 constexpr size_t ReadErrorValue = 0;
120 const size_t ReadErrorValue = 0;
121121 EXPECT_EQ(ReadErrorValue, Cursor.Read(32));
122122 // Should be at eof now.
123123 EXPECT_TRUE(Cursor.AtEndOfStream());
124
125 delete[] Text;
124126 }
125127
126128 TEST(BitReaderTest, MateralizeForwardRefWithStream) {