[cfe-commits] [Patch][Review Request]Fix for PR7287

Jim Goodnow II jim at thegoodnows.net
Mon Nov 1 13:59:23 PDT 2010


Hi,

Please review and commit this patch for PR7287. Thanks.

  - jim


Index: lib/Checker/CStringChecker.cpp
===================================================================
--- lib/Checker/CStringChecker.cpp	(revision 117848)
+++ 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 117848)
+++ 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: PR7287.patch
Type: application/octet-stream
Size: 984 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20101101/22b868a6/attachment.obj>


More information about the cfe-commits mailing list