diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-05 23:16:31 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-05 23:16:31 +0000 |
commit | 046845e84226a3aa343a64eba368b710bbfb8d1a (patch) | |
tree | 1b4db6d457a8b1fe6e4378567f82c391ae181a2b /clang/lib | |
parent | f15cd14a3d1e4dbbdc22f6c3ae7c46189a16be5e (diff) | |
download | bcm5719-llvm-046845e84226a3aa343a64eba368b710bbfb8d1a.tar.gz bcm5719-llvm-046845e84226a3aa343a64eba368b710bbfb8d1a.zip |
Make CF retain diagnostics more succinct.
In a leak's "name", indicate GC or non-GC bugs.
llvm-svn: 50680
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index ed8c595745a..83e79637144 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/lib/Analysis/CFRefCount.cpp @@ -1509,7 +1509,8 @@ namespace { 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 @@ namespace { 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 @@ namespace { 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 @@ namespace { 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 { |