Fix PR 3337 [retain/release checker]: Handle FunctionDecl's declared using typedefs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62331 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index af96c06..c72d2a3 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -737,7 +737,9 @@
       break;
     }
     
-    FunctionType* FT = cast<FunctionType>(FD->getType());
+    // [PR 3337] Use 'getDesugaredType' to strip away any typedefs on the
+    // function's type.
+    FunctionType* FT = cast<FunctionType>(FD->getType()->getDesugaredType());
     const char* FName = FD->getIdentifier()->getName();
     
     // Inspect the result type.