[cfe-commits] r164579 - /cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

Anna Zaks ganna at apple.com
Mon Sep 24 17:31:43 PDT 2012


Author: zaks
Date: Mon Sep 24 19:31:43 2012
New Revision: 164579

URL: http://llvm.org/viewvc/llvm-project?rev=164579&view=rev
Log:
[analyzer] Fix a buildbot crash triggered by turning on dynamic
dispatch.

Modified:
    cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp

Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp?rev=164579&r1=164578&r2=164579&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp Mon Sep 24 19:31:43 2012
@@ -763,7 +763,7 @@
     // since 'nil' is rarely returned in practice, we should not warn when the
     // caller to the defensive constructor uses the object in contexts where
     // 'nil' is not accepted.
-    if (C.isWithinInlined() &&
+    if (C.isWithinInlined() && M.getDecl() &&
         M.getDecl()->getMethodFamily() == OMF_init &&
         M.isReceiverSelfOrSuper()) {
       State = assumeExprIsNonNull(M.getOriginExpr(), State, C);





More information about the cfe-commits mailing list