[test] Reinstate the assignment to the diagnostic log in the unittest

from r363009

The diagnostic log is now set to "-" which forces it to use STDERR
instead of the filesystem. A new comment is added to explain why
the assignment is needed in the test.

llvm-svn: 363199
This commit is contained in:
Alex Lorenz 2019-06-12 20:35:44 +00:00
parent 565f1e2298
commit 514cfdb18d
1 changed files with 4 additions and 0 deletions

View File

@ -73,6 +73,10 @@ TEST(CompilerInstance, DefaultVFSOverlayFromInvocation) {
TEST(CompilerInstance, AllowDiagnosticLogWithUnownedDiagnosticConsumer) { TEST(CompilerInstance, AllowDiagnosticLogWithUnownedDiagnosticConsumer) {
auto DiagOpts = new DiagnosticOptions(); auto DiagOpts = new DiagnosticOptions();
// Tell the diagnostics engine to emit the diagnostic log to STDERR. This
// ensures that a chained diagnostic consumer is created so that the test can
// exercise the unowned diagnostic consumer in a chained consumer.
DiagOpts->DiagnosticLogFile = "-";
// Create the diagnostic engine with unowned consumer. // Create the diagnostic engine with unowned consumer.
std::string DiagnosticOutput; std::string DiagnosticOutput;