[PATCH] D29303: In VirtualCallChecker, handle indirect calls
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 30 13:17:58 PST 2017
sammccall updated this revision to Diff 86337.
sammccall added a comment.
Oops, reverted noise :(
https://reviews.llvm.org/D29303
Files:
lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
Index: lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
===================================================================
--- lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
+++ lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp
@@ -179,7 +179,8 @@
}
// Get the callee.
- const CXXMethodDecl *MD = dyn_cast<CXXMethodDecl>(CE->getDirectCallee());
+ const CXXMethodDecl *MD =
+ dyn_cast_or_null<CXXMethodDecl>(CE->getDirectCallee());
if (MD && MD->isVirtual() && !callIsNonVirtual && !MD->hasAttr<FinalAttr>() &&
!MD->getParent()->hasAttr<FinalAttr>())
ReportVirtualCall(CE, MD->isPure());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29303.86337.patch
Type: text/x-patch
Size: 625 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170130/8a9236b3/attachment.bin>
More information about the cfe-commits
mailing list