1// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -ast-dump "%s" | FileCheck %s
2
3// CHECK: TypedefDecl {{.*}} referenced AtomicBool '_Atomic(_Bool)'
4// CHECK:  AtomicType {{.*}} '_Atomic(_Bool)'
5// CHECK:   BuiltinType {{.*}} '_Bool'
6// CHECK: ObjCInterfaceDecl {{.*}} A0
7// CHECK:  ObjCPropertyDecl {{.*}} p '_Atomic(_Bool)' {{.*}} nonatomic
8// CHECK:  ObjCMethodDecl {{.*}} implicit - p '_Bool'
9// CHECK:  ObjCMethodDecl {{.*}} implicit - setP: 'void'
10// CHECK:   ParmVarDecl {{.*}} p '_Bool'
11// CHECK: ObjCInterfaceDecl {{.*}} A1
12// CHECK:  ObjCPropertyDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)' {{.*}} nonatomic
13// CHECK:  ObjCMethodDecl {{.*}} implicit - p '_Bool'
14// CHECK:  ObjCMethodDecl {{.*}} implicit - setP: 'void'
15// CHECK:   ParmVarDecl {{.*}} p '_Bool'
16// CHECK: ObjCInterfaceDecl {{.*}} A2
17// CHECK:  ObjCIvarDecl {{.*}} p '_Atomic(_Bool)' protected
18// CHECK:  ObjCPropertyDecl {{.*}} p '_Atomic(_Bool)'
19// CHECK:  ObjCMethodDecl {{.*}} implicit - p '_Bool'
20// CHECK:  ObjCMethodDecl {{.*}} implicit - setP: 'void'
21// CHECK:   ParmVarDecl {{.*}} p '_Bool'
22// CHECK: ObjCInterfaceDecl {{.*}} A3
23// CHECK:  ObjCIvarDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)' protected
24// CHECK:  ObjCPropertyDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)'
25// CHECK:  ObjCMethodDecl {{.*}} implicit - p '_Bool'
26// CHECK:  ObjCMethodDecl {{.*}} implicit - setP: 'void'
27// CHECK:   ParmVarDecl {{.*}} p '_Bool'
28
29typedef _Atomic(_Bool) AtomicBool;
30
31@interface A0
32@property(nonatomic) _Atomic(_Bool) p;
33@end
34@implementation A0
35@end
36
37@interface A1
38@property(nonatomic) AtomicBool p;
39@end
40@implementation A1
41@end
42
43@interface A2 {
44  _Atomic(_Bool) p;
45}
46@property _Atomic(_Bool) p;
47@end
48
49@implementation A2
50@synthesize p;
51@end
52
53@interface A3 {
54  AtomicBool p;
55}
56@property AtomicBool p;
57@end
58
59@implementation A3
60@synthesize p;
61@end
62