]> granicus.if.org Git - clang/commitdiff
Teach RetainSummaryManager::getSummary(FunctionDecl* FD) that 'FD->getIdentifier...
authorTed Kremenek <kremenek@apple.com>
Wed, 16 Dec 2009 06:06:43 +0000 (06:06 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 16 Dec 2009 06:06:43 +0000 (06:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91512 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFRefCount.cpp

index 9639ad98fa69eedcfed1ea8fbdf61ec0e498ad15..cc73841b78e84105ed2237ca0c7d259c20f1898f 100644 (file)
@@ -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.