[cfe-commits] [PATCH][Review Request] - fix some core dumps when analyzing C++ operator calls
Jim Goodnow II
jim at thegoodnows.net
Fri Sep 17 05:39:12 PDT 2010
Just a couple of crashes when some of the experimental checkers tried
to analyze C++ operator calls.
- jim
Index: lib/Checker/CStringChecker.cpp
===================================================================
--- lib/Checker/CStringChecker.cpp (revision 113834)
+++ lib/Checker/CStringChecker.cpp (working copy)
@@ -901,6 +901,9 @@
const Expr *Callee = CE->getCallee();
const FunctionDecl *FD = state->getSVal(Callee).getAsFunctionDecl();
+ // Ignore C++ operator calls or getName() will implode
+ if (isa<CXXOperatorCallExpr>(CE))
+ return false;
if (!FD)
return false;
Index: lib/Checker/PthreadLockChecker.cpp
===================================================================
--- lib/Checker/PthreadLockChecker.cpp (revision 113834)
+++ lib/Checker/PthreadLockChecker.cpp (working copy)
@@ -62,6 +62,9 @@
const FunctionTextRegion *R =
dyn_cast_or_null<FunctionTextRegion>(state->getSVal(Callee).getAsRegion());
+ // Ignore C++ operator calls or getName() will implode
+ if (isa<CXXOperatorCallExpr>(CE))
+ return;
if (!R)
return;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opcall.patch
Type: application/octet-stream
Size: 984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100917/f55f94e5/attachment.obj>
More information about the cfe-commits
mailing list