1// Test without serialization: 2// RUN: %clang_cc1 -fsyntax-only -verify %s 3// RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s 4// 5// Test with serialization: 6// RUN: %clang_cc1 -emit-pch -o %t %s 7// RUN: %clang_cc1 -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// expected-no-diagnostics 12 13__attribute__ ((external_source_symbol(language= "Swift", defined_in="A"))) 14@interface TestInterface 15@end 16// CHECK: ObjCInterfaceDecl {{.*}} TestInterface 17// CHECK-NEXT: ExternalSourceSymbolAttr 18 19__attribute__ ((external_source_symbol(language= "Swift", defined_in="B"))) 20@interface TestInterface () 21@end 22// CHECK: ObjCCategoryDecl 23// CHECK-NEXT: ObjCInterface 24// CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "B" 25 26__attribute__ ((external_source_symbol(language= "Swift", defined_in="C"))) 27@interface TestInterface (Category) 28@end 29// CHECK: ObjCCategoryDecl 30// CHECK-NEXT: ObjCInterface 31// CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "C" 32