From 4396c54c14e78f9e2de340ad4b1e193d2dd06d73 Mon Sep 17 00:00:00 2001 From: Anna Zaks Date: Tue, 25 Sep 2012 00:31:43 +0000 Subject: [PATCH] [analyzer] Fix a buildbot crash triggered by turning on dynamic dispatch. llvm-svn: 164579 --- clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index 1078cd36..48dd415 100644 --- a/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp @@ -763,7 +763,7 @@ void ObjCNonNilReturnValueChecker::checkPostObjCMessage(const ObjCMethodCall &M, // 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); -- 2.7.4