retain/release checker: Enhance leak description to say that the bug

occurs in GC mode.

llvm-svn: 70638
This commit is contained in:
Ted Kremenek 2009-05-02 19:05:19 +00:00
parent 38ebcaa8c8
commit f1e7667099
1 changed files with 5 additions and 1 deletions

View 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)