Lines Matching full:dllimport
7 __declspec(dllimport) typedef int typedef1; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
8 typedef __declspec(dllimport) int typedef2; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
9 typedef int __declspec(dllimport) typedef3; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
10 typedef __declspec(dllimport) void (*FunTy)(); // expected-warning{{'dllimport' attribute only applies to variables and functions}}
11 enum __declspec(dllimport) Enum { EnumVal }; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
12 struct __declspec(dllimport) Record {}; // expected-warning{{'dllimport' attribute only applies to variables and functions}}
21 __declspec(dllimport) extern int ExternGlobalDecl;
23 // dllimport implies a declaration.
24 __declspec(dllimport) int GlobalDecl;
25 int **__attribute__((dllimport))* GlobalDeclChunkAttr;
26 int GlobalDeclAttr __attribute__((dllimport));
32 __declspec(dllimport) extern int ExternGlobalInit = 1; // expected-error{{definition of dllimport data}}
33 __declspec(dllimport) int GlobalInit1 = 1; // expected-error{{definition of dllimport data}}
34 int __declspec(dllimport) GlobalInit2 = 1; // expected-error{{definition of dllimport data}}
37 __declspec(dllimport) extern int ExternGlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
38 int ExternGlobalDeclInit = 1; // expected-warning{{'ExternGlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
40 __declspec(dllimport) int GlobalDeclInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
41 int GlobalDeclInit = 1; // expected-warning{{'GlobalDeclInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
43 int *__attribute__((dllimport)) GlobalDeclChunkAttrInit; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
44 int *GlobalDeclChunkAttrInit = 0; // expected-warning{{'GlobalDeclChunkAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
46 int GlobalDeclAttrInit __attribute__((dllimport)); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
47 int GlobalDeclAttrInit = 1; // expected-warning{{'GlobalDeclAttrInit' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
50 __declspec(dllimport) extern int GlobalRedecl1;
51 __declspec(dllimport) extern int GlobalRedecl1;
53 __declspec(dllimport) int GlobalRedecl2a;
54 __declspec(dllimport) int GlobalRedecl2a;
56 int *__attribute__((dllimport)) GlobalRedecl2b;
57 int *__attribute__((dllimport)) GlobalRedecl2b;
59 int GlobalRedecl2c __attribute__((dllimport));
60 int GlobalRedecl2c __attribute__((dllimport));
63 // and drop the dllimport with a warning.
64 __declspec(dllimport) extern int GlobalRedecl3; // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
65 extern int GlobalRedecl3; // expected-warning{{'GlobalRedecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
70 __declspec(dllimport) extern int GlobalRedecl4; // expected-error{{redeclaration of 'GlobalRedecl4' cannot add 'dllimport' attribute}}
74 __declspec(dllimport) extern int GlobalRedecl5; // expected-warning{{redeclaration of 'GlobalRedecl5' should not add 'dllimport' attribute}}
78 __declspec(dllimport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllimport'}}
81 __declspec(dllimport) __thread int ThreadLocalGlobal; // expected-error{{'ThreadLocalGlobal' cannot be thread local when declared 'dllimport'}}
84 __declspec(dllimport) float LocalRedecl1; // expected-note{{previous declaration is here}}
85 __declspec(dllimport) float LocalRedecl2; // expected-note{{previous declaration is here}}
86 __declspec(dllimport) float LocalRedecl3; // expected-note{{previous declaration is here}}
87 __declspec(dllimport) float LocalRedecl4;
89 __declspec(dllimport) int LocalRedecl1; // expected-error{{redeclaration of 'LocalRedecl1' with a different type: 'int' vs 'float'}}
90 int *__attribute__((dllimport)) LocalRedecl2; // expected-error{{redeclaration of 'LocalRedecl2' with a different type: 'int *' vs 'float'}}
91 int LocalRedecl3 __attribute__((dllimport)); // expected-error{{redeclaration of 'LocalRedecl3' with a different type: 'int' vs 'float'}}
93 __declspec(dllimport) int LocalVarDecl;
94 __declspec(dllimport) int LocalVarDef = 1; // expected-error{{definition of dllimport data}}
95 __declspec(dllimport) extern int ExternLocalVarDecl;
96 __declspec(dllimport) extern int ExternLocalVarDef = 1; // expected-error{{definition of dllimport data}}
97 __declspec(dllimport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllimport'}}
110 __attribute__((dllimport)) void decl1A(); // Sanity check with __attribute__
111 __declspec(dllimport) void decl1B();
113 void __attribute__((dllimport)) decl2A();
114 void __declspec(dllimport) decl2B();
122 __declspec(dllimport) void def() {} // expected-error{{dllimport cannot be applied to non-inline function definition}}
126 // expected-warning@+3{{'dllimport' attribute ignored on inline function}}
127 // expected-warning@+3{{'dllimport' attribute ignored on inline function}}
129 __declspec(dllimport) inline void inlineFunc1() {}
130 inline void __attribute__((dllimport)) inlineFunc2() {}
133 __declspec(dllimport) void redecl1();
134 __declspec(dllimport) void redecl1();
137 // and drop the dllimport with a warning.
138 __declspec(dllimport) void redecl2(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
139 void redecl2(); // expected-warning{{'redecl2' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
141 __declspec(dllimport) void redecl3(); // expected-note{{previous declaration is here}} expected-note{{previous attribute is here}}
142 void redecl3() {} // expected-warning{{'redecl3' redeclared without 'dllimport' attribute: previous 'dllimport' ignored}}
146 __declspec(dllimport) void redecl4(); // expected-warning{{redeclaration of 'redecl4' should not add 'dllimport' attribute}}
150 __declspec(dllimport) void redecl5(); // expected-warning{{redeclaration of 'redecl5' should not add 'dllimport' attribute}}
155 // expected-warning@+3{{'redecl6' redeclared inline; 'dllimport' attribute ignored}}
157 __declspec(dllimport) void redecl6();
162 // expected-warning@+5{{redeclaration of 'redecl7' should not add 'dllimport' attribute}}
164 // expected-warning@+3{{'dllimport' attribute ignored on inline function}}
167 __declspec(dllimport) inline void redecl7() {}
170 __declspec(dllimport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllimport'}}
174 __declspec(dllimport) static int staticLocal; // expected-error{{'staticLocal' must have external linkage when declared 'dllimport'}}