]> granicus.if.org Git - clang/commitdiff
retain/release checker: Enhance leak description to say that the bug
authorTed Kremenek <kremenek@apple.com>
Sat, 2 May 2009 19:05:19 +0000 (19:05 +0000)
committerTed Kremenek <kremenek@apple.com>
Sat, 2 May 2009 19:05:19 +0000 (19:05 +0000)
occurs in GC mode.

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

lib/Analysis/CFRefCount.cpp

index 7ea462a1bb8bec3cb3369df26c9c2429f785e5c6..b4f87826901e1abc73e948faf158f50c0ad53c56 100644 (file)
@@ -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)