From 3e14b95d99da94b38c1d0ff1da7e38af34eb8006 Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Sun, 26 Apr 2020 15:18:25 +0200 Subject: [PATCH] raw_ostream_test: Add a missing buffer flush --- llvm/unittests/Support/raw_ostream_test.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/Support/raw_ostream_test.cpp b/llvm/unittests/Support/raw_ostream_test.cpp index 3df01be..9f25034 100644 --- a/llvm/unittests/Support/raw_ostream_test.cpp +++ b/llvm/unittests/Support/raw_ostream_test.cpp @@ -18,9 +18,11 @@ namespace { template std::string printToString(const T &Value) { std::string res; - llvm::raw_string_ostream OS(res); - OS.SetBuffered(); - OS << Value; + { + llvm::raw_string_ostream OS(res); + OS.SetBuffered(); + OS << Value; + } return res; } -- 2.7.4