diff --git a/toolchain/testing/file_test.cpp b/toolchain/testing/file_test.cpp index 6fdbefb06d3c..83b0d2a8d0c5 100644 --- a/toolchain/testing/file_test.cpp +++ b/toolchain/testing/file_test.cpp @@ -45,13 +45,12 @@ class ToolchainFileTest : public FileTestBase { } Driver driver(fs, &installation_, stdout, stderr); - auto loc_before = stderr.tell(); auto driver_result = driver.RunCommand(test_args); // If any diagnostics have been produced, add a trailing newline to make the // last diagnostic match intermediate diagnostics (that have a newline // separator between them). This reduces churn when adding new diagnostics // to test cases. - if (loc_before != stderr.tell()) { + if (stderr.tell() > 0) { stderr << '\n'; }