aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/ObjCMessage.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-05-04 17:37:16 +0000
committerAnna Zaks <ganna@apple.com>2012-05-04 17:37:16 +0000
commit84d43848e39eab9e3386cbfb3906ba2d6a382f24 (patch)
treeb49e7d0a151415565a5bc79ffa4d75edb7ea44a0 /lib/StaticAnalyzer/Core/ObjCMessage.cpp
parent6a26e2e54aa2a8cc6c977081befd8e80e7573ca4 (diff)
[analyzer]Fixup r156134: Handle the case when FunctionDecl isn't avail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@156183 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ObjCMessage.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/ObjCMessage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/ObjCMessage.cpp b/lib/StaticAnalyzer/Core/ObjCMessage.cpp
index 0c6d8a8b63..994e6fbe62 100644
--- a/lib/StaticAnalyzer/Core/ObjCMessage.cpp
+++ b/lib/StaticAnalyzer/Core/ObjCMessage.cpp
@@ -139,7 +139,7 @@ bool CallOrObjCMessage::hasNonZeroCallbackArg() const {
FD = Ctor->getConstructor();
const CallExpr * CE = CallE.get<const CallExpr *>();
- FD = dyn_cast<FunctionDecl>(CE->getCalleeDecl());
+ FD = dyn_cast_or_null<FunctionDecl>(CE->getCalleeDecl());
// If calling using a function pointer, assume the function does not
// have a callback. TODO: We could check the types of the arguments here.