[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / category-attribute.m
blob55835c7300acebbe2664936797af8db4f11a4f30
1 // Test without serialization:
2 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 // RUN: %clang_cc1 -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"