summaryrefslogtreecommitdiffstats
path: root/clang/lib/Analysis
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-05-02 19:05:19 +0000
committerTed Kremenek <kremenek@apple.com>2009-05-02 19:05:19 +0000
commitf1e7667099328ff219b8f6a745acdd28fcaa899f (patch)
tree0f793ce279a48b97c076cc2bb0c70e4a56e04d70 /clang/lib/Analysis
parent38ebcaa8c83d3fa9d0efcf7a076e827538b92c82 (diff)
downloadbcm5719-llvm-f1e7667099328ff219b8f6a745acdd28fcaa899f.tar.gz
bcm5719-llvm-f1e7667099328ff219b8f6a745acdd28fcaa899f.zip
retain/release checker: Enhance leak description to say that the bug
occurs in GC mode. llvm-svn: 70638
Diffstat (limited to 'clang/lib/Analysis')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 7ea462a1bb8..b4f87826901 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/lib/Analysis/CFRefCount.cpp
@@ -2519,7 +2519,11 @@ CFRefLeakReport::CFRefLeakReport(CFRefBug& D, const CFRefCount &tf,
llvm::raw_string_ostream os(Description);
SourceManager& SMgr = Eng.getContext().getSourceManager();
unsigned AllocLine = SMgr.getInstantiationLineNumber(AllocSite);
- os << "Potential leak of object allocated on line " << AllocLine;
+ os << "Potential leak ";
+ if (tf.isGCEnabled()) {
+ os << "(when using garbage collection) ";
+ }
+ os << "of an object allocated on line " << AllocLine;
// FIXME: AllocBinding doesn't get populated for RegionStore yet.
if (AllocBinding)
OpenPOWER on IntegriCloud