Don't assume that the type of a FunctionDecl is a FunctionType; that 
assumption isn't accurate in the presence of typedefs.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/typedef-func.c b/test/CodeGen/typedef-func.c
new file mode 100644
index 0000000..08328e6
--- /dev/null
+++ b/test/CodeGen/typedef-func.c
@@ -0,0 +1,13 @@
+// RUN: clang -emit-llvm < %s
+
+// PR2414
+typedef void filter_func_t();
+filter_func_t mono_filter;
+
+void addfilter2(filter_func_t *func){}
+
+void setup_filters()
+{
+        addfilter2( mono_filter);
+}
+