aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/VirtualCallChecker.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
commit07189521a15d9c088216b943649cb9fe231cbb57 (patch)
tree649cd12e68237a26ec96485b1ed9ccdde7bf4c83 /lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
parentf54486acc1cadf2791c3916ece66fded1e57ba0b (diff)
Include the "issue context" (e.g. function or method) where a static analyzer issue occurred in the plist output.
Fixes <rdar://problem/11004527> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154030 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
index 1d1803ce4c..f7c7c0ce34 100644
--- a/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
@@ -186,7 +186,8 @@ void WalkAST::ReportVirtualCall(const CallExpr *CE, bool isPure) {
if (isPure) {
os << "\n" << "Call pure virtual functions during construction or "
<< "destruction may leads undefined behaviour";
- BR.EmitBasicReport("Call pure virtual function during construction or "
+ BR.EmitBasicReport(AC->getDecl(),
+ "Call pure virtual function during construction or "
"Destruction",
"Cplusplus",
os.str(), CELoc, &R, 1);
@@ -195,7 +196,8 @@ void WalkAST::ReportVirtualCall(const CallExpr *CE, bool isPure) {
else {
os << "\n" << "Call virtual functions during construction or "
<< "destruction will never go to a more derived class";
- BR.EmitBasicReport("Call virtual function during construction or "
+ BR.EmitBasicReport(AC->getDecl(),
+ "Call virtual function during construction or "
"Destruction",
"Cplusplus",
os.str(), CELoc, &R, 1);