]> granicus.if.org Git - clang/commitdiff
[FrontendTests] Try again to make test not write an output file master origin/HEAD origin/master
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 22 Oct 2019 08:44:34 +0000 (08:44 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 22 Oct 2019 08:44:34 +0000 (08:44 +0000)
Setting the output stream to nulls seems to work.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@375491 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Frontend/OutputStreamTest.cpp

index 14537ecdc56c7c68685c2dd735980c87b03c945b..6a867bf053cbde537daa75270659badae0bd6430 100644 (file)
@@ -58,6 +58,7 @@ TEST(FrontendOutputTests, TestVerboseOutputStreamShared) {
   std::string VerboseBuffer;
   raw_string_ostream VerboseStream(VerboseBuffer);
 
+  Compiler.setOutputStream(std::make_unique<raw_null_ostream>());
   Compiler.setInvocation(std::move(Invocation));
   IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
   Compiler.createDiagnostics(
@@ -86,6 +87,7 @@ TEST(FrontendOutputTests, TestVerboseOutputStreamOwned) {
     std::unique_ptr<raw_ostream> VerboseStream =
         std::make_unique<raw_string_ostream>(VerboseBuffer);
 
+    Compiler.setOutputStream(std::make_unique<raw_null_ostream>());
     Compiler.setInvocation(std::move(Invocation));
     IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts = new DiagnosticOptions();
     Compiler.createDiagnostics(