summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
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
commita1de8567fcf50edb789a72fd563d9a17225954c7 (patch)
treeaa317153863eeb3f9f482d7758be8c93fc5dd08e /clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parentb54457242c1cb772cb40645b4cd553ce38aeb2dc (diff)
downloadbcm5719-llvm-a1de8567fcf50edb789a72fd563d9a17225954c7.tar.gz
bcm5719-llvm-a1de8567fcf50edb789a72fd563d9a17225954c7.zip
[analyzer] Shorten the malloc checker’s leak message
As per Ted’s suggestion! llvm-svn: 178938
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index a1ec819ef28..51205d863ab 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/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,
OpenPOWER on IntegriCloud