blob: 0758a422cab8cee841fec77fd691dbdfba269353 [file] [log] [blame]
Serge Pavlovb43573b2017-05-24 14:57:17 +00001// RUN: c-index-test -index-file %s -target armv7-windows-gnu -fdeclspec | FileCheck %s
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +00002
3struct __declspec(dllexport) export_s {
4 void m();
5};
6// CHECK: [indexDeclaration]: kind: struct | name: export_s | {{.*}} | lang: C++
7// CHECK: <attribute>: attribute(dllexport)
8// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
9// CHECK: <attribute>: attribute(dllexport)
10
11struct __declspec(dllimport) import_s {
12 void m();
13};
14// CHECK: [indexDeclaration]: kind: struct | name: import_s | {{.*}} | lang: C++
15// CHECK: <attribute>: attribute(dllimport)
16// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
17// CHECK: <attribute>: attribute(dllimport)
18
19class __attribute__((dllexport)) export_gnu_s {
20 void m();
21};
Serge Pavlovb43573b2017-05-24 14:57:17 +000022// CHECK: [indexDeclaration]: kind: c++-class | name: export_gnu_s | {{.*}} | lang: C++
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000023// CHECK: <attribute>: attribute(dllexport)
24// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
25// CHECK: <attribute>: attribute(dllexport)
26
27class __attribute__((dllimport)) import_gnu_s {
28 void m();
29};
Serge Pavlovb43573b2017-05-24 14:57:17 +000030// CHECK: [indexDeclaration]: kind: c++-class | name: import_gnu_s | {{.*}} | lang: C++
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000031// CHECK: <attribute>: attribute(dllimport)
32// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
33// CHECK: <attribute>: attribute(dllimport)
34
35extern "C" void __declspec(dllexport) export_function(void) {}
Serge Pavlovb43573b2017-05-24 14:57:17 +000036// CHECK: [indexDeclaration]: kind: function | name: export_function | {{.*}} | lang: C
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000037// CHECK: <attribute>: attribute(dllexport)
38extern "C" void __attribute__((dllexport)) export_gnu_function(void) {}
Serge Pavlovb43573b2017-05-24 14:57:17 +000039// CHECK: [indexDeclaration]: kind: function | name: export_gnu_function | {{.*}} | lang: C
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000040// CHECK: <attribute>: attribute(dllexport)
41
42extern "C" {
43void __declspec(dllimport) import_function(void);
Serge Pavlovb43573b2017-05-24 14:57:17 +000044// CHECK: [indexDeclaration]: kind: function | name: import_function | {{.*}} | lang: C
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000045// CHECK: <attribute>: attribute(dllimport)
46void __attribute__((dllimport)) import_gnu_function(void);
Serge Pavlovb43573b2017-05-24 14:57:17 +000047// CHECK: [indexDeclaration]: kind: function | name: import_gnu_function | {{.*}} | lang: C
Saleem Abdulrasool8aa0b802015-12-10 18:45:18 +000048// CHECK: <attribute>: attribute(dllimport)
49}
50