1// Test without serialization: 2// RUN: %clang_cc1 -triple x86_64-apple-macosx10.10 -ast-dump "%s" \ 3// RUN: | FileCheck %s 4// 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//" \ 9// RUN: | FileCheck %s 10 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' 36 37typedef _Atomic(_Bool) AtomicBool; 38 39@interface A0 40@property(nonatomic) _Atomic(_Bool) p; 41@end 42@implementation A0 43@end 44 45@interface A1 46@property(nonatomic) AtomicBool p; 47@end 48@implementation A1 49@end 50 51@interface A2 { 52 _Atomic(_Bool) p; 53} 54@property _Atomic(_Bool) p; 55@end 56 57@implementation A2 58@synthesize p; 59@end 60 61@interface A3 { 62 AtomicBool p; 63} 64@property AtomicBool p; 65@end 66 67@implementation A3 68@synthesize p; 69@end 70