xref: /llvm-project/clang/test/AST/attr-swift_newtype.m (revision 296d8832a3b5fe97725be62c5bbc721cc0e2cd20)
1// RUN: %clang_cc1 -ast-dump %s | FileCheck %s
2
3typedef int T1 __attribute__((__swift_newtype__(struct)));
4typedef int T2 __attribute__((__swift_newtype__(enum)));
5
6typedef int T3 __attribute__((__swift_wrapper__(struct)));
7typedef int T4 __attribute__((__swift_wrapper__(enum)));
8
9typedef int T5;
10typedef int T5 __attribute__((__swift_wrapper__(struct)));
11typedef int T5;
12// CHECK-LABEL: TypedefDecl {{.+}} T5 'int'
13// CHECK-NEXT: BuiltinType {{.+}} 'int'
14// CHECK-NEXT: TypedefDecl {{.+}} T5 'int'
15// CHECK-NEXT: BuiltinType {{.+}} 'int'
16// CHECK-NEXT: SwiftNewTypeAttr {{.+}} NK_Struct
17// CHECK-NEXT: TypedefDecl {{.+}} T5 'int'
18// CHECK-NEXT: BuiltinType {{.+}} 'int'
19// CHECK-NEXT: SwiftNewTypeAttr {{.+}} NK_Struct
20