2017-05-24 22:57:17 +08:00
|
|
|
// RUN: c-index-test -index-file %s -target armv7-windows-gnu -fdeclspec | FileCheck %s
|
2015-12-11 02:45:18 +08:00
|
|
|
|
|
|
|
struct __declspec(dllexport) export_s {
|
|
|
|
void m();
|
|
|
|
};
|
|
|
|
// CHECK: [indexDeclaration]: kind: struct | name: export_s | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
|
|
|
|
struct __declspec(dllimport) import_s {
|
|
|
|
void m();
|
|
|
|
};
|
|
|
|
// CHECK: [indexDeclaration]: kind: struct | name: import_s | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
|
|
|
|
class __attribute__((dllexport)) export_gnu_s {
|
|
|
|
void m();
|
|
|
|
};
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: c++-class | name: export_gnu_s | {{.*}} | lang: C++
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
|
|
|
|
class __attribute__((dllimport)) import_gnu_s {
|
|
|
|
void m();
|
|
|
|
};
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: c++-class | name: import_gnu_s | {{.*}} | lang: C++
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
// CHECK: [indexDeclaration]: kind: c++-instance-method | name: m | {{.*}} | lang: C++
|
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
|
|
|
|
extern "C" void __declspec(dllexport) export_function(void) {}
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: function | name: export_function | {{.*}} | lang: C
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
extern "C" void __attribute__((dllexport)) export_gnu_function(void) {}
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: function | name: export_gnu_function | {{.*}} | lang: C
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllexport)
|
|
|
|
|
|
|
|
extern "C" {
|
|
|
|
void __declspec(dllimport) import_function(void);
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: function | name: import_function | {{.*}} | lang: C
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
void __attribute__((dllimport)) import_gnu_function(void);
|
2017-05-24 22:57:17 +08:00
|
|
|
// CHECK: [indexDeclaration]: kind: function | name: import_gnu_function | {{.*}} | lang: C
|
2015-12-11 02:45:18 +08:00
|
|
|
// CHECK: <attribute>: attribute(dllimport)
|
|
|
|
}
|
|
|
|
|