From: Ted Kremenek Date: Fri, 15 Oct 2010 22:50:23 +0000 (+0000) Subject: Tweak retain/release checker diagnostics to specify a leak occurs because an object... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abf517c523985f20bb6458e0aa1afad434de3244;p=clang Tweak retain/release checker diagnostics to specify a leak occurs because an object is not referenced later in the path, not that it isn't referenced later in the code. Fixes . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116636 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Checker/CFRefCount.cpp b/lib/Checker/CFRefCount.cpp index 35451a1866..8d1f4ba053 100644 --- a/lib/Checker/CFRefCount.cpp +++ b/lib/Checker/CFRefCount.cpp @@ -2420,8 +2420,8 @@ CFRefLeakReport::getEndPath(BugReporterContext& BRC, "collector"; } else - os << " is no longer referenced after this point and has a retain count of" - " +" << RV->getCount() << " (object leaked)"; + os << " is not referenced later in this execution path and has a retain " + "count of +" << RV->getCount() << " (object leaked)"; return new PathDiagnosticEventPiece(L, os.str()); } diff --git a/test/Analysis/plist-output-alternate.m b/test/Analysis/plist-output-alternate.m index 364289d6d2..d063348a11 100644 --- a/test/Analysis/plist-output-alternate.m +++ b/test/Analysis/plist-output-alternate.m @@ -994,9 +994,9 @@ void rdar8331641(int x) { // CHECK: // CHECK: // CHECK: extended_message -// CHECK: Object allocated on line 53 and stored into 'value' is no longer referenced after this point and has a retain count of +1 (object leaked) +// CHECK: Object allocated on line 53 and stored into 'value' is not referenced later in this execution path and has a retain count of +1 (object leaked) // CHECK: message -// CHECK: Object allocated on line 53 and stored into 'value' is no longer referenced after this point and has a retain count of +1 (object leaked) +// CHECK: Object allocated on line 53 and stored into 'value' is not referenced later in this execution path and has a retain count of +1 (object leaked) // CHECK: // CHECK: // CHECK: descriptionPotential leak of an object allocated on line 53 and stored into 'value'