aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/CFRefCount.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-12-16 06:06:43 +0000
committerTed Kremenek <kremenek@apple.com>2009-12-16 06:06:43 +0000
commit48c6d181dfcba412ae4b9e1dab59205913018806 (patch)
treec714e780ba02cf8e225978e9c69f53792d6064f4 /lib/Analysis/CFRefCount.cpp
parenta0f7727abd351646a4c7efe38c563a894bcf5403 (diff)
Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier()' will not always return a non-null IdentifierInfo*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91512 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r--lib/Analysis/CFRefCount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 9639ad98fa..cc73841b78 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -1149,7 +1149,11 @@ RetainSummary* RetainSummaryManager::getSummary(FunctionDecl* FD) {
// [PR 3337] Use 'getAs<FunctionType>' to strip away any typedefs on the
// function's type.
const FunctionType* FT = FD->getType()->getAs<FunctionType>();
- const char* FName = FD->getIdentifier()->getNameStart();
+ const IdentifierInfo *II = FD->getIdentifier();
+ if (!II)
+ break;
+
+ const char* FName = II->getNameStart();
// Strip away preceding '_'. Doing this here will effect all the checks
// down below.