]> granicus.if.org Git - clang/commitdiff
Tweak retain/release checker diagnostics to specify a leak occurs because an object...
authorTed Kremenek <kremenek@apple.com>
Fri, 15 Oct 2010 22:50:23 +0000 (22:50 +0000)
committerTed Kremenek <kremenek@apple.com>
Fri, 15 Oct 2010 22:50:23 +0000 (22:50 +0000)
not that it isn't referenced later in the code.  Fixes <rdar://problem/8527839>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@116636 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Checker/CFRefCount.cpp
test/Analysis/plist-output-alternate.m

index 35451a18669dfe8750cbc41c8ae71322cfb47dee..8d1f4ba053324f45f1fb1796443539fd78673248 100644 (file)
@@ -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());
 }
index 364289d6d29f4dab5cf24dd2c655bf0488c8de1e..d063348a11690234b34688d782e5f797e941c825 100644 (file)
@@ -994,9 +994,9 @@ void rdar8331641(int x) {
 // CHECK:        </array>
 // CHECK:      </array>
 // CHECK:      <key>extended_message</key>
-// CHECK:      <string>Object allocated on line 53 and stored into &apos;value&apos; is no longer referenced after this point and has a retain count of +1 (object leaked)</string>
+// CHECK:      <string>Object allocated on line 53 and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1 (object leaked)</string>
 // CHECK:      <key>message</key>
-// CHECK: <string>Object allocated on line 53 and stored into &apos;value&apos; is no longer referenced after this point and has a retain count of +1 (object leaked)</string>
+// CHECK: <string>Object allocated on line 53 and stored into &apos;value&apos; is not referenced later in this execution path and has a retain count of +1 (object leaked)</string>
 // CHECK:     </dict>
 // CHECK:    </array>
 // CHECK:    <key>description</key><string>Potential leak of an object allocated on line 53 and stored into &apos;value&apos;</string>