aboutsummaryrefslogtreecommitdiff
path: root/lib/ARCMigrate/Internals.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ARCMigrate/Internals.h')
-rw-r--r--lib/ARCMigrate/Internals.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/ARCMigrate/Internals.h b/lib/ARCMigrate/Internals.h
index 3690c83d8457..a65b329c5b03 100644
--- a/lib/ARCMigrate/Internals.h
+++ b/lib/ARCMigrate/Internals.h
@@ -48,7 +48,6 @@ void writeARCDiagsToPlist(const std::string &outPath,
class TransformActions {
DiagnosticsEngine &Diags;
CapturedDiagList &CapturedDiags;
- bool ReportedErrors;
void *Impl; // TransformActionsImpl.
public:
@@ -95,6 +94,8 @@ public:
return CapturedDiags.hasDiagnostic(IDs, range);
}
+ DiagnosticBuilder report(SourceLocation loc, unsigned diagId,
+ SourceRange range = SourceRange());
void reportError(StringRef error, SourceLocation loc,
SourceRange range = SourceRange());
void reportWarning(StringRef warning, SourceLocation loc,
@@ -102,7 +103,9 @@ public:
void reportNote(StringRef note, SourceLocation loc,
SourceRange range = SourceRange());
- bool hasReportedErrors() const { return ReportedErrors; }
+ bool hasReportedErrors() const {
+ return Diags.hasUnrecoverableErrorOccurred();
+ }
class RewriteReceiver {
public:
@@ -161,8 +164,6 @@ public:
const CapturedDiagList &getDiags() const { return CapturedDiags; }
bool isGCMigration() const { return OrigGCMode != LangOptions::NonGC; }
- bool noNSAllocReallocError() const { return MigOptions.NoNSAllocReallocError; }
- void setNSAllocReallocError(bool val) { MigOptions.NoNSAllocReallocError = val; }
bool noFinalizeRemoval() const { return MigOptions.NoFinalizeRemoval; }
void setNoFinalizeRemoval(bool val) {MigOptions.NoFinalizeRemoval = val; }