[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / AST / category-attribute.m
blobe74f1a1ffbc1e7cd820626a9cc93e49cb8606645
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
11 // expected-no-diagnostics
13 __attribute__ ((external_source_symbol(language= "Swift", defined_in="A")))
14 @interface TestInterface
15 @end
16 // CHECK: ObjCInterfaceDecl {{.*}} TestInterface
17 // CHECK-NEXT: ExternalSourceSymbolAttr
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"
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"