summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-04-04 18:11:35 +0000
committerTed Kremenek <kremenek@apple.com>2012-04-04 18:11:35 +0000
commit5a10f08b52eb8f6a9bedccd712026c9baae529df (patch)
tree94edf3f958f0872da7f3895744a83c82361d3f8b /clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
parentb61e809b42156161b17ff1bf805da01499d73b9f (diff)
downloadbcm5719-llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.tar.gz
bcm5719-llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.zip
Include the "issue context" (e.g. function or method) where a static analyzer issue occurred in the plist output.
Fixes <rdar://problem/11004527> llvm-svn: 154030
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
index 9dd8da57ec9..aa6f97b2fa8 100644
--- a/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
@@ -112,8 +112,8 @@ void AnalyzerStatsChecker::checkEndAnalysis(ExplodedGraph &G,
<< " | Empty WorkList: "
<< (Eng.hasEmptyWorkList() ? "yes" : "no");
- B.EmitBasicReport("Analyzer Statistics", "Internal Statistics", output.str(),
- PathDiagnosticLocation(D, SM));
+ B.EmitBasicReport(D, "Analyzer Statistics", "Internal Statistics",
+ output.str(), PathDiagnosticLocation(D, SM));
// Emit warning for each block we bailed out on.
typedef CoreEngine::BlocksExhausted::const_iterator ExhaustedIterator;
@@ -128,8 +128,9 @@ void AnalyzerStatsChecker::checkEndAnalysis(ExplodedGraph &G,
llvm::raw_svector_ostream outputI(bufI);
outputI << "(" << NameOfRootFunction << ")" <<
": The analyzer generated a sink at this point";
- B.EmitBasicReport("Sink Point", "Internal Statistics", outputI.str(),
- PathDiagnosticLocation::createBegin(CS->getStmt(), SM, LC));
+ B.EmitBasicReport(D, "Sink Point", "Internal Statistics", outputI.str(),
+ PathDiagnosticLocation::createBegin(CS->getStmt(),
+ SM, LC));
}
}
}
OpenPOWER on IntegriCloud