diff options
Diffstat (limited to 'clang/lib/ARCMigrate/TransGCCalls.cpp')
-rw-r--r-- | clang/lib/ARCMigrate/TransGCCalls.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/clang/lib/ARCMigrate/TransGCCalls.cpp b/clang/lib/ARCMigrate/TransGCCalls.cpp index 7c0819a677c..1be902088c6 100644 --- a/clang/lib/ARCMigrate/TransGCCalls.cpp +++ b/clang/lib/ARCMigrate/TransGCCalls.cpp @@ -38,9 +38,14 @@ public: TransformActions &TA = MigrateCtx.Pass.TA; if (MigrateCtx.isGCOwnedNonObjC(E->getType())) { - TA.reportError("call returns pointer to GC managed memory; " - "it will become unmanaged in ARC", - E->getLocStart(), E->getSourceRange()); + if (MigrateCtx.Pass.noNSAllocReallocError()) + TA.reportWarning("call returns pointer to GC managed memory; " + "it will become unmanaged in ARC", + E->getLocStart(), E->getSourceRange()); + else + TA.reportError("call returns pointer to GC managed memory; " + "it will become unmanaged in ARC", + E->getLocStart(), E->getSourceRange()); return true; } |