aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-04-06 00:41:36 +0000
committerAnna Zaks <ganna@apple.com>2013-04-06 00:41:36 +0000
commit68eb4c25e961d18f82b47a0a385f90d7af09bcc3 (patch)
tree3d5d3f87204a05f0b0dc7ec68cfd23871d203d13 /lib/StaticAnalyzer/Checkers
parentcb3443925f967b5d51e582b39e28f67d41d73199 (diff)
[analyzer] Shorten the malloc checker’s leak message
As per Ted’s suggestion! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178938 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers')
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index a1ec819ef2..51205d863a 100644
--- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -1585,11 +1585,12 @@ void MallocChecker::reportLeak(SymbolRef Sym, ExplodedNode *N,
SmallString<200> buf;
llvm::raw_svector_ostream os(buf);
- os << "Memory is never released; potential leak";
if (Region && Region->canPrintPretty()) {
- os << " of memory pointed to by '";
+ os << "Potential leak of memory pointed to by '";
Region->printPretty(os);
os << '\'';
+ } else {
+ os << "Potential memory leak";
}
BugReport *R = new BugReport(*BT_Leak, os.str(), N,