summaryrefslogtreecommitdiffstats
path: root/clang/lib/ARCMigrate/ARCMT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/ARCMigrate/ARCMT.cpp')
-rw-r--r--clang/lib/ARCMigrate/ARCMT.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/clang/lib/ARCMigrate/ARCMT.cpp b/clang/lib/ARCMigrate/ARCMT.cpp
index a93f1c62c0e..99980345c40 100644
--- a/clang/lib/ARCMigrate/ARCMT.cpp
+++ b/clang/lib/ARCMigrate/ARCMT.cpp
@@ -79,6 +79,14 @@ void CapturedDiagList::reportDiagnostics(Diagnostic &Diags) const {
Diags.Report(*I);
}
+bool CapturedDiagList::hasErrors() const {
+ for (ListTy::const_iterator I = List.begin(), E = List.end(); I != E; ++I)
+ if (I->getLevel() >= Diagnostic::Error)
+ return true;
+
+ return false;
+}
+
namespace {
class CaptureDiagnosticClient : public DiagnosticClient {
@@ -236,7 +244,7 @@ bool arcmt::checkForManualIssues(CompilerInvocation &origCI,
DiagClient->EndSourceFile();
- return Diags->getClient()->getNumErrors() > 0;
+ return capturedDiags.hasErrors();
}
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud