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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363199
91177308-0d34-0410-b5e6-
96231b3b80d8
TEST(CompilerInstance, AllowDiagnosticLogWithUnownedDiagnosticConsumer) {
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.
std::string DiagnosticOutput;