diff options
author | Alex Lorenz <arphaman@gmail.com> | 2019-06-12 20:35:44 +0000 |
---|---|---|
committer | Alex Lorenz <arphaman@gmail.com> | 2019-06-12 20:35:44 +0000 |
commit | 3e2811672412a66b5f43f5f613a824e12276d694 (patch) | |
tree | b900343949965eaf6b1d17d024b382249ecdcd7c /unittests/Frontend | |
parent | 727426ea36eadcb12ae93c5a1b20b44a47f56e08 (diff) | |
download | clang-3e2811672412a66b5f43f5f613a824e12276d694.tar.gz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Frontend')
-rw-r--r-- | unittests/Frontend/CompilerInstanceTest.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/unittests/Frontend/CompilerInstanceTest.cpp b/unittests/Frontend/CompilerInstanceTest.cpp index 3b3dc527df..4935853f13 100644 --- a/unittests/Frontend/CompilerInstanceTest.cpp +++ b/unittests/Frontend/CompilerInstanceTest.cpp @@ -73,6 +73,10 @@ TEST(CompilerInstance, DefaultVFSOverlayFromInvocation) { 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; |