1 // Test without serialization:
2 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -ast-dump "%s" \
5 // Test with serialization:
6 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -emit-pch -o %t %s
7 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -x objective-c -include-pch %t -ast-dump-all /dev/null \
8 // RUN: | sed -e "s/ <undeserialized declarations>//" -e "s/ imported//" \
11 // CHECK: TypedefDecl {{.*}} referenced AtomicBool '_Atomic(_Bool)'
12 // CHECK: AtomicType {{.*}} '_Atomic(_Bool)'
13 // CHECK: BuiltinType {{.*}} '_Bool'
14 // CHECK: ObjCInterfaceDecl {{.*}} A0
15 // CHECK: ObjCPropertyDecl {{.*}} p '_Atomic(_Bool)' {{.*}} nonatomic
16 // CHECK: ObjCMethodDecl {{.*}} implicit - p '_Bool'
17 // CHECK: ObjCMethodDecl {{.*}} implicit - setP: 'void'
18 // CHECK: ParmVarDecl {{.*}} p '_Bool'
19 // CHECK: ObjCInterfaceDecl {{.*}} A1
20 // CHECK: ObjCPropertyDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)' {{.*}} nonatomic
21 // CHECK: ObjCMethodDecl {{.*}} implicit - p '_Bool'
22 // CHECK: ObjCMethodDecl {{.*}} implicit - setP: 'void'
23 // CHECK: ParmVarDecl {{.*}} p '_Bool'
24 // CHECK: ObjCInterfaceDecl {{.*}} A2
25 // CHECK: ObjCIvarDecl {{.*}} p '_Atomic(_Bool)' protected
26 // CHECK: ObjCPropertyDecl {{.*}} p '_Atomic(_Bool)'
27 // CHECK: ObjCMethodDecl {{.*}} implicit - p '_Bool'
28 // CHECK: ObjCMethodDecl {{.*}} implicit - setP: 'void'
29 // CHECK: ParmVarDecl {{.*}} p '_Bool'
30 // CHECK: ObjCInterfaceDecl {{.*}} A3
31 // CHECK: ObjCIvarDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)' protected
32 // CHECK: ObjCPropertyDecl {{.*}} p 'AtomicBool':'_Atomic(_Bool)'
33 // CHECK: ObjCMethodDecl {{.*}} implicit - p '_Bool'
34 // CHECK: ObjCMethodDecl {{.*}} implicit - setP: 'void'
35 // CHECK: ParmVarDecl {{.*}} p '_Bool'
37 typedef _Atomic(_Bool) AtomicBool;
40 @property(nonatomic) _Atomic(_Bool) p;
46 @property(nonatomic) AtomicBool p;
54 @property _Atomic(_Bool) p;
64 @property AtomicBool p;