From d5dd7d230ecaf8242f4429a5e3653e16bf55bcd6 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 17 Sep 2024 11:56:40 -0500 Subject: [flang] Tidy uses of raw_string_ostream (NFC) As specified in the docs, 1) raw_string_ostream is always unbuffered and 2) the underlying buffer may be used directly ( 65b13610a5226b84889b923bae884ba395ad084d for further reference ) Avoid unneeded calls to raw_string_ostream::str(), to avoid excess indirection. --- flang/unittests/Frontend/CodeGenActionTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'flang/unittests/Frontend/CodeGenActionTest.cpp') diff --git a/flang/unittests/Frontend/CodeGenActionTest.cpp b/flang/unittests/Frontend/CodeGenActionTest.cpp index 9d798c7..5d75de0 100644 --- a/flang/unittests/Frontend/CodeGenActionTest.cpp +++ b/flang/unittests/Frontend/CodeGenActionTest.cpp @@ -103,7 +103,7 @@ TEST(CodeGenAction, GracefullyHandleLLVMConversionFailure) { action.setCurrentInput(file); consumeError(action.execute()); - ASSERT_EQ(diagnosticsOS.str(), + ASSERT_EQ(diagnosticOutput, "error: Lowering to LLVM IR failed\n" "error: failed to create the LLVM module\n"); } -- cgit v1.1