summaryrefslogtreecommitdiffstats
path: root/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Core/PlistDiagnostics.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/PlistDiagnostics.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
index ba3ad2e..a2c66f8 100644
--- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
+++ b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
@@ -42,7 +42,7 @@ namespace {
void FlushDiagnosticsImpl(std::vector<const PathDiagnostic *> &Diags,
FilesMade *filesMade) override;
- virtual StringRef getName() const override {
+ StringRef getName() const override {
return "PlistDiagnostics";
}
@@ -338,10 +338,10 @@ void PlistDiagnostics::FlushDiagnosticsImpl(
}
// Open the file.
- std::string ErrMsg;
- llvm::raw_fd_ostream o(OutputFile.c_str(), ErrMsg, llvm::sys::fs::F_Text);
- if (!ErrMsg.empty()) {
- llvm::errs() << "warning: could not create file: " << OutputFile << '\n';
+ std::error_code EC;
+ llvm::raw_fd_ostream o(OutputFile, EC, llvm::sys::fs::F_Text);
+ if (EC) {
+ llvm::errs() << "warning: could not create file: " << EC.message() << '\n';
return;
}
OpenPOWER on IntegriCloud