[cfe-commits] r50680 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Mon May 5 16:16:31 PDT 2008
Author: kremenek
Date: Mon May 5 18:16:31 2008
New Revision: 50680
URL: http://llvm.org/viewvc/llvm-project?rev=50680&view=rev
Log:
Make CF retain diagnostics more succinct.
In a leak's "name", indicate GC or non-GC bugs.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=50680&r1=50679&r2=50680&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Mon May 5 18:16:31 2008
@@ -1509,7 +1509,8 @@
CFRefBug(CFRefCount& tf) : TF(tf) {}
CFRefCount& getTF() { return TF; }
-
+ const CFRefCount& getTF() const { return TF; }
+
virtual bool isLeak() const { return false; }
};
@@ -1518,7 +1519,7 @@
UseAfterRelease(CFRefCount& tf) : CFRefBug(tf) {}
virtual const char* getName() const {
- return "Core Foundation: Use-After-Release";
+ return "Use-After-Release";
}
virtual const char* getDescription() const {
return "Reference-counted object is used"
@@ -1533,7 +1534,7 @@
BadRelease(CFRefCount& tf) : CFRefBug(tf) {}
virtual const char* getName() const {
- return "Core Foundation: Release of non-owned object";
+ return "Bad Release";
}
virtual const char* getDescription() const {
return "Incorrect decrement of the reference count of a "
@@ -1549,7 +1550,7 @@
Leak(CFRefCount& tf) : CFRefBug(tf) {}
virtual const char* getName() const {
- return "Core Foundation: Memory Leak";
+ return getTF().isGCEnabled() ? "Memory Leak (GC)" : "Memory Leak";
}
virtual const char* getDescription() const {
More information about the cfe-commits
mailing list