[cfe-commits] r116636 - in /cfe/trunk: lib/Checker/CFRefCount.cpp test/Analysis/plist-output-alternate.m
Ted Kremenek
kremenek at apple.com
Fri Oct 15 15:50:23 PDT 2010
Author: kremenek
Date: Fri Oct 15 17:50:23 2010
New Revision: 116636
URL: http://llvm.org/viewvc/llvm-project?rev=116636&view=rev
Log:
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 <rdar://problem/8527839>.
Modified:
cfe/trunk/lib/Checker/CFRefCount.cpp
cfe/trunk/test/Analysis/plist-output-alternate.m
Modified: cfe/trunk/lib/Checker/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Checker/CFRefCount.cpp?rev=116636&r1=116635&r2=116636&view=diff
==============================================================================
--- cfe/trunk/lib/Checker/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Checker/CFRefCount.cpp Fri Oct 15 17:50:23 2010
@@ -2420,8 +2420,8 @@
"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());
}
Modified: cfe/trunk/test/Analysis/plist-output-alternate.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/plist-output-alternate.m?rev=116636&r1=116635&r2=116636&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/plist-output-alternate.m (original)
+++ cfe/trunk/test/Analysis/plist-output-alternate.m Fri Oct 15 17:50:23 2010
@@ -994,9 +994,9 @@
// CHECK: </array>
// CHECK: </array>
// CHECK: <key>extended_message</key>
-// CHECK: <string>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)</string>
+// CHECK: <string>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)</string>
// CHECK: <key>message</key>
-// CHECK: <string>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)</string>
+// CHECK: <string>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)</string>
// CHECK: </dict>
// CHECK: </array>
// CHECK: <key>description</key><string>Potential leak of an object allocated on line 53 and stored into 'value'</string>
More information about the cfe-commits
mailing list