diff options
author | Anna Zaks <ganna@apple.com> | 2012-09-25 00:31:43 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2012-09-25 00:31:43 +0000 |
commit | c693339753d7ec0b9af6a6e4173aeaf6f9ec866c (patch) | |
tree | b4665c1a31828a5719384531561b4d166f6686c1 /lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | |
parent | 54b3ba8cf2eb4886a88cdb8adedb15f43333ff1d (diff) |
[analyzer] Fix a buildbot crash triggered by turning on dynamic
dispatch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164579 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp b/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp index 1078cd3634..48dd41593c 100644 --- a/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp +++ b/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); |