summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/category-attribute.m
blob: 7efe3df00ec8ac58d745e7df67eb5f3a360b8a9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: %clang_cc1 -fsyntax-only -verify %s
// RUN: %clang_cc1 -fsyntax-only -ast-dump %s | FileCheck %s
// expected-no-diagnostics

__attribute__ ((external_source_symbol(language= "Swift", defined_in="A")))
@interface TestInterface
@end
// CHECK: ObjCInterfaceDecl {{.*}} TestInterface
// CHECK-NEXT: ExternalSourceSymbolAttr

__attribute__ ((external_source_symbol(language= "Swift", defined_in="B")))
@interface TestInterface ()
@end
// CHECK: ObjCCategoryDecl
// CHECK-NEXT: ObjCInterface
// CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "B"

__attribute__ ((external_source_symbol(language= "Swift", defined_in="C")))
@interface TestInterface (Category)
@end
// CHECK: ObjCCategoryDecl
// CHECK-NEXT: ObjCInterface
// CHECK-NEXT: ExternalSourceSymbolAttr {{.*}} "Swift" "C"
OpenPOWER on IntegriCloud