1 // XFAIL: target={{.*}}-aix{{.*}}
2 // RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s
4 #define GEN_DECL_USR(mod_name, usr) __attribute__((external_source_symbol(language="Swift", defined_in=mod_name, USR=usr, generated_declaration)))
6 class GEN_DECL_USR("Module", "s:Class") Class
{
8 void method() GEN_DECL_USR("Module", "s:Class_method");
9 void method2() GEN_DECL_USR("Module", "");
11 static void staticMethod() GEN_DECL_USR("Module", "s:Class_staticMethod");
15 class GEN_DECL_USR("Module", "s:TemplateClass") TemplateClass
{
17 void method() GEN_DECL_USR("Module", "s:TemplateClass_method");
22 // CHECK: [[@LINE-1]]:3 | class/Swift | Class | s:Class |
23 // CHECK: [[@LINE-2]]:13 | class/Swift | Class | s:Class |
25 // CHECK: [[@LINE-1]]:5 | instance-method/Swift | method | s:Class_method |
27 // CHECK: [[@LINE-1]]:5 | instance-method/Swift | method2 | c:@M@Module@S@Class@F@method2# |
28 Class::staticMethod();
29 // CHECK: [[@LINE-1]]:10 | static-method/Swift | staticMethod | s:Class_staticMethod |
30 // CHECK: [[@LINE-2]]:3 | class/Swift | Class | s:Class |
31 TemplateClass
<int> c2
= TemplateClass
<int>();
32 // CHECK: [[@LINE-1]]:3 | class(Gen)/Swift | TemplateClass | s:TemplateClass |
33 // CHECK: [[@LINE-2]]:27 | class(Gen)/Swift | TemplateClass | s:TemplateClass |
35 // CHECK: [[@LINE-1]]:6 | instance-method/Swift | method | s:TemplateClass_method |