diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-04-04 18:11:35 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-04-04 18:11:35 +0000 |
commit | 5a10f08b52eb8f6a9bedccd712026c9baae529df (patch) | |
tree | 94edf3f958f0872da7f3895744a83c82361d3f8b /clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp | |
parent | b61e809b42156161b17ff1bf805da01499d73b9f (diff) | |
download | llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.zip llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.tar.gz llvm-5a10f08b52eb8f6a9bedccd712026c9baae529df.tar.bz2 |
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/VirtualCallChecker.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp index 1d1803c..f7c7c0c 100644 --- a/clang/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp +++ b/clang/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); |