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;
   

Attachment: opcall.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to