1*67e74705SXin Li // RUN: c-index-test -index-file -check-prefix CHECK %s -target armv7-windows-gnu -fdeclspec 2*67e74705SXin Li 3*67e74705SXin Li struct __declspec(dllexport) export_s { 4*67e74705SXin Li void m(); 5*67e74705SXin Li }; 6*67e74705SXin Li // CHECK: [indexDeclaration]: kind: struct | name: export_s | {{.*}} | lang: C++ 7*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) 8*67e74705SXin Li // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++ 9*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) 10*67e74705SXin Li 11*67e74705SXin Li struct __declspec(dllimport) import_s { 12*67e74705SXin Li void m(); 13*67e74705SXin Li }; 14*67e74705SXin Li // CHECK: [indexDeclaration]: kind: struct | name: import_s | {{.*}} | lang: C++ 15*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 16*67e74705SXin Li // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++ 17*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 18*67e74705SXin Li 19*67e74705SXin Li class __attribute__((dllexport)) export_gnu_s { 20*67e74705SXin Li void m(); 21*67e74705SXin Li }; 22*67e74705SXin Li // CHECK: [indexDeclaration]: kind: struct | name: export_gnu_s | {{.*}} | lang: C++ 23*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) 24*67e74705SXin Li // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++ 25*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) 26*67e74705SXin Li 27*67e74705SXin Li class __attribute__((dllimport)) import_gnu_s { 28*67e74705SXin Li void m(); 29*67e74705SXin Li }; 30*67e74705SXin Li // CHECK: [indexDeclaration]: kind: struct | name: import_gnu_s | {{.*}} | lang: C++ 31*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 32*67e74705SXin Li // CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++ 33*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 34*67e74705SXin Li export_function(void)35*67e74705SXin Liextern "C" void __declspec(dllexport) export_function(void) {} 36*67e74705SXin Li // CHECK: [indexDeclaraton]: kind: function | name: export_function | {{.*}} | lang: C 37*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) export_gnu_function(void)38*67e74705SXin Liextern "C" void __attribute__((dllexport)) export_gnu_function(void) {} 39*67e74705SXin Li // CHECK: [indexDeclaraton]: kind: function | name: export_gnu_function | {{.*}} | lang: C 40*67e74705SXin Li // CHECK: <attribute>: attribute(dllexport) 41*67e74705SXin Li 42*67e74705SXin Li extern "C" { 43*67e74705SXin Li void __declspec(dllimport) import_function(void); 44*67e74705SXin Li // CHECK: [indexDeclaration] kind: function | name: import_function | {{.*}} | lang: C 45*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 46*67e74705SXin Li void __attribute__((dllimport)) import_gnu_function(void); 47*67e74705SXin Li // CHECK: [indexDeclaration] kind: function | name: import_gnu_function | {{.*}} | lang: C 48*67e74705SXin Li // CHECK: <attribute>: attribute(dllimport) 49*67e74705SXin Li } 50*67e74705SXin Li 51