summaryrefslogtreecommitdiffstats
path: root/clang/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
commit9bcc264494b76ee6af5c435ce9829a8d694fadce (patch)
tree7aec511c7b08fca768ab07516bffe66df2ca8008 /clang/lib/Analysis/CFRefCount.cpp
parent2d251557ef7b89c9a0e400f22c5f7bfb0ff21a3a (diff)
downloadbcm5719-llvm-9bcc264494b76ee6af5c435ce9829a8d694fadce.tar.gz
bcm5719-llvm-9bcc264494b76ee6af5c435ce9829a8d694fadce.zip
Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier()' will not always return a non-null IdentifierInfo*.
llvm-svn: 91512
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r--clang/lib/Analysis/CFRefCount.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp
index 9639ad98fa6..cc73841b78e 100644
--- a/clang/lib/Analysis/CFRefCount.cpp
+++ b/clang/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.
OpenPOWER on IntegriCloud