From 7ab83427af0f77b59941ceba41d509d7d097b065 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 10 Jun 2017 13:44:06 +0000 Subject: Vendor import of llvm trunk r305145: https://llvm.org/svn/llvm-project/llvm/trunk@305145 --- unittests/Support/BinaryStreamTest.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'unittests/Support/BinaryStreamTest.cpp') diff --git a/unittests/Support/BinaryStreamTest.cpp b/unittests/Support/BinaryStreamTest.cpp index 1ce74cbb722b..795c18902a9b 100644 --- a/unittests/Support/BinaryStreamTest.cpp +++ b/unittests/Support/BinaryStreamTest.cpp @@ -416,9 +416,7 @@ TEST_F(BinaryStreamTest, VarStreamArray) { struct StringExtractor { public: - typedef uint32_t &ContextType; - static Error extract(BinaryStreamRef Stream, uint32_t &Len, StringRef &Item, - uint32_t &Index) { + Error operator()(BinaryStreamRef Stream, uint32_t &Len, StringRef &Item) { if (Index == 0) Len = strlen("1. Test"); else if (Index == 1) @@ -435,11 +433,12 @@ TEST_F(BinaryStreamTest, VarStreamArray) { ++Index; return Error::success(); } + + uint32_t Index = 0; }; for (auto &Stream : Streams) { - uint32_t Context = 0; - VarStreamArray Array(*Stream.Input, Context); + VarStreamArray Array(*Stream.Input); auto Iter = Array.begin(); ASSERT_EQ("1. Test", *Iter++); ASSERT_EQ("2. Longer Test", *Iter++); -- cgit v1.2.3