1 // Test without serialization:
2 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
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//" \
11 // expected-no-diagnostics
13 __attribute__ ((external_source_symbol(language= "Swift", defined_in="A")))
14 @interface TestInterface
16 // CHECK: ObjCInterfaceDecl {{.*}} TestInterface
17 // CHECK-NEXT: ExternalSourceSymbolAttr
19 __attribute__ ((external_source_symbol(language= "Swift", defined_in="B")))
20 @interface TestInterface ()
22 // CHECK: ObjCCategoryDecl
23 // CHECK-NEXT: ObjCInterface
24 // CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "B"
26 __attribute__ ((external_source_symbol(language= "Swift", defined_in="C")))
27 @interface TestInterface (Category)
29 // CHECK: ObjCCategoryDecl
30 // CHECK-NEXT: ObjCInterface
31 // CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "C"