Out << "inline ";
std::string Proto = FD->getName();
- FunctionType *AFT = cast<FunctionType>(FD->getType());
+ const FunctionType *AFT = FD->getType()->getAsFunctionType();
- if (FunctionTypeProto *FT = dyn_cast<FunctionTypeProto>(AFT)) {
+ if (const FunctionTypeProto *FT = dyn_cast<FunctionTypeProto>(AFT)) {
Proto += "(";
for (unsigned i = 0, e = FD->getNumParams(); i != e; ++i) {
if (i) Proto += ", ";
--- /dev/null
+// RUN: clang %s -ast-print
+
+typedef void func_typedef();
+func_typedef xxx;
+
+