Remove leftover code and use the text path diagnostic client even without a specified output file since
it just uses diagnostic notes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120773 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/TextPathDiagnostics.cpp b/lib/Checker/TextPathDiagnostics.cpp
index 03c6088..83ff7a4 100644
--- a/lib/Checker/TextPathDiagnostics.cpp
+++ b/lib/Checker/TextPathDiagnostics.cpp
@@ -20,7 +20,7 @@
namespace {
-/// \brief Simple path diagnostic client used for outputting as text
+/// \brief Simple path diagnostic client used for outputting as diagnostic notes
/// the sequence of events.
class TextPathDiagnostics : public PathDiagnosticClient {
const std::string OutputFile;
@@ -61,14 +61,6 @@
return;
}
- // Open the file.
- std::string ErrMsg;
- llvm::raw_fd_ostream o(OutputFile.c_str(), ErrMsg);
- if (!ErrMsg.empty()) {
- llvm::errs() << "warning: could not create file: " << OutputFile << '\n';
- return;
- }
-
for (PathDiagnostic::const_iterator I=D->begin(), E=D->end(); I != E; ++I) {
if (isa<PathDiagnosticEventPiece>(*I)) {
PathDiagnosticEventPiece &event = cast<PathDiagnosticEventPiece>(*I);