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