ParmVarDecl *PVDecl = *PI;
QualType PType = PVDecl->getOriginalType();
if (const ArrayType *AT =
- dyn_cast<ArrayType>(PType->getCanonicalTypeInternal()))
- // Use array's original type only if it has known number of
- // elements.
- if (!dyn_cast<ConstantArrayType>(AT))
- PType = PVDecl->getType();
+ dyn_cast<ArrayType>(PType->getCanonicalTypeInternal())) {
+ // Use array's original type only if it has known number of
+ // elements.
+ if (!dyn_cast<ConstantArrayType>(AT))
+ PType = PVDecl->getType();
+ } else if (PType->isFunctionType())
+ PType = PVDecl->getType();
// Process argument qualifiers for user supplied arguments; such as,
// 'in', 'inout', etc.
getObjCEncodingForTypeQualifier(PVDecl->getObjCDeclQualifier(), S);
--- /dev/null
+// RUN: clang-cc %s -emit-llvm
+
+@interface I0 @end
+@implementation I0
+- (void) im0: (int (void)) a0 {
+}
+@end
+
+void func(int pf(void)) {
+}