T->getAttrKind() == AttributedType::attr_objc_ownership)
return printAfter(T->getEquivalentType(), OS);
- if (T->getAttrKind() == AttributedType::attr_objc_kindof)
- return;
-
- // TODO: not all attributes are GCC-style attributes.
- if (T->isMSTypeSpec())
- return;
-
- // Nothing to print after.
- if (T->getAttrKind() == AttributedType::attr_nonnull ||
- T->getAttrKind() == AttributedType::attr_nullable ||
- T->getAttrKind() == AttributedType::attr_null_unspecified)
- return printAfter(T->getModifiedType(), OS);
-
// If this is a calling convention attribute, don't print the implicit CC from
// the modified type.
SaveAndRestore<bool> MaybeSuppressCC(InsideCCAttribute, T->isCallingConv());
printAfter(T->getModifiedType(), OS);
+ // Some attributes are printed as qualifiers before the type, so we have
+ // nothing left to do.
+ if (T->getAttrKind() == AttributedType::attr_objc_kindof ||
+ T->isMSTypeSpec() ||
+ T->getAttrKind() == AttributedType::attr_nonnull ||
+ T->getAttrKind() == AttributedType::attr_nullable ||
+ T->getAttrKind() == AttributedType::attr_null_unspecified)
+ return;
+
// Don't print the inert __unsafe_unretained attribute at all.
if (T->getAttrKind() == AttributedType::attr_objc_inert_unsafe_unretained)
return;
--- /dev/null
+// RUN: %clang_cc1 -ast-print -x objective-c++ -fms-extensions %s -o - | FileCheck %s
+
+// CHECK: using A = __kindof id (*)[1];
+using A = __kindof id (*)[1];
+
+// CHECK: using B = int ** __ptr32 *[3];
+using B = int ** __ptr32 *[3];
+
+// FIXME: This is the wrong spelling for the attribute.
+// FIXME: Too many parens here!
+// CHECK: using C = int ((*))() __attribute__((cdecl));
+using C = int (*)() [[gnu::cdecl]];