Lines Matching refs:__declspec

19 __declspec(dllexport) typedef int typedef1; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
20 typedef __declspec(dllexport) int typedef2; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
21 typedef int __declspec(dllexport) typedef3; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
22 typedef __declspec(dllexport) void (*FunTy)(); // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
23 enum __declspec(dllexport) Enum {}; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
25 enum class __declspec(dllexport) EnumClass {}; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
35 __declspec(dllexport) extern int ExternGlobalDecl;
38 __declspec(dllexport) int GlobalDef;
41 __declspec(dllexport) int GlobalInit1 = 1;
42 int __declspec(dllexport) GlobalInit2 = 1;
45 __declspec(dllexport) extern int GlobalDeclInit;
49 __declspec(dllexport) extern int GlobalRedecl1;
50 __declspec(dllexport) int GlobalRedecl1;
52 __declspec(dllexport) extern int GlobalRedecl2;
56 __declspec(dllexport) extern int GlobalRedecl3; // expected-error{{redeclaration of 'GlobalRedecl3' cannot add 'dllexport' attribute}}
59 __declspec(dllexport) static int StaticGlobal; // expected-error{{'StaticGlobal' must have external linkage when declared 'dllexport'}}
60 __declspec(dllexport) Internal InternalTypeGlobal; // expected-error{{'InternalTypeGlobal' must have external linkage when declared 'dllexport'}}
61 namespace { __declspec(dllexport) int InternalGlobal; } // expected-error{{'(anonymous namespace)::InternalGlobal' must have external linkage when declared 'dllexport'}}
62 namespace ns { __declspec(dllexport) int ExternalGlobal; }
64 __declspec(dllexport) auto InternalAutoTypeGlobal = Internal(); // expected-error{{'InternalAutoTypeGlobal' must have external linkage when declared 'dllexport'}}
65 __declspec(dllexport) auto ExternalAutoTypeGlobal = External();
69 __declspec(dllexport) int LocalVarDecl; // expected-error{{'LocalVarDecl' must have external linkage when declared 'dllexport'}}
70 __declspec(dllexport) int LocalVarDef = 1; // expected-error{{'LocalVarDef' must have external linkage when declared 'dllexport'}}
71 __declspec(dllexport) extern int ExternLocalVarDecl;
72 __declspec(dllexport) static int StaticLocalVar; // expected-error{{'StaticLocalVar' must have external linkage when declared 'dllexport'}}
83 template<typename T> __declspec(dllexport) extern int ExternVarTmplDecl;
86 template<typename T> __declspec(dllexport) int VarTmplDef;
89 template<typename T> __declspec(dllexport) int VarTmplInit1 = 1;
90 template<typename T> int __declspec(dllexport) VarTmplInit2 = 1;
93 template<typename T> __declspec(dllexport) extern int VarTmplDeclInit;
97 template<typename T> __declspec(dllexport) extern int VarTmplRedecl1;
98 template<typename T> __declspec(dllexport) int VarTmplRedecl1 = 1;
100 template<typename T> __declspec(dllexport) extern int VarTmplRedecl2;
104 template<typename T> __declspec(dllexport) extern int VarTmplRedecl3; // expected-error{{redeclaration of 'VarTmplRedecl3' cannot add 'dllexport' attribute}}
107 template<typename T> __declspec(dllexport) static int StaticVarTmpl; // expected-error{{'StaticVarTmpl' must have external linkage when declared 'dllexport'}}
108 template<typename T> __declspec(dllexport) Internal InternalTypeVarTmpl; // expected-error{{'InternalTypeVarTmpl' must have external linkage when declared 'dllexport'}}
109 namespace { template<typename T> __declspec(dllexport) int InternalVarTmpl; } // expected-error{{'(anonymous namespace)::InternalVarTmpl' must have external linkage when declared 'dllexport'}}
110 namespace ns { template<typename T> __declspec(dllexport) int ExternalVarTmpl = 1; }
112 template<typename T> __declspec(dllexport) auto InternalAutoTypeVarTmpl = Internal(); // expected-error{{'InternalAutoTypeVarTmpl' must have external linkage when declared 'dllexport'}}
113 template<typename T> __declspec(dllexport) auto ExternalAutoTypeVarTmpl = External();
118 template<typename T> __declspec(dllexport) int ExportedVarTmpl = 1;
128 template __declspec(dllexport) int ExportedVarTmpl<ExplicitInst_Exported>;
131 template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Exported>;
132 template<> __declspec(dllexport) int ExportedVarTmpl<ExplicitSpec_Def_Exported> = 1;
140 extern template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
141 template __declspec(dllexport) int VarTmpl<ExplicitDecl_Exported>;
144 template __declspec(dllexport) int VarTmpl<ExplicitInst_Exported>;
147 template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Exported>;
148 template<> __declspec(dllexport) int VarTmpl<ExplicitSpec_Def_Exported> = 1;
160 __declspec(dllexport) void decl1B();
163 void __declspec(dllexport) decl2B();
166 __declspec(dllexport) void def() {}
169 extern "C" __declspec(dllexport) void externC() {}
172 __declspec(dllexport) inline void inlineFunc1() {}
175 __declspec(dllexport) inline void inlineDecl();
178 __declspec(dllexport) void inlineDef();
182 __declspec(dllexport) void redecl1();
183 __declspec(dllexport) void redecl1() {}
185 __declspec(dllexport) void redecl2();
189 __declspec(dllexport) void redecl3(); // expected-error{{redeclaration of 'redecl3' cannot add 'dllexport' attribute}}
192 __declspec(dllexport) inline void redecl4() {} // expected-error{{redeclaration of 'redecl4' cannot add 'dllexport' attribute}}
196 friend __declspec(dllexport) void friend1();
197 friend __declspec(dllexport) void friend2();
201 __declspec(dllexport) void friend1() {}
203 __declspec(dllexport) void friend3() {} // expected-error{{redeclaration of 'friend3' cannot add 'dllexport' attribute}}
204 __declspec(dllexport) inline void friend4() {} // expected-error{{redeclaration of 'friend4' cannot add 'dllexport' attribute}}
207 __declspec(dllexport) void* operator new(__SIZE_TYPE__ n);
210 __declspec(dllexport) static int staticFunc(); // expected-error{{'staticFunc' must have external linkage when declared 'dllexport'}}
211 __declspec(dllexport) Internal internalRetFunc(); // expected-error{{'internalRetFunc' must have external linkage when declared 'dllexport'}}
212 namespace { __declspec(dllexport) void internalFunc() {} } // expected-error{{'(anonymous namespace)::internalFunc' must have external linkage when declared 'dllexport'}}
213 namespace ns { __declspec(dllexport) void externalFunc() {} }
216 __declspec(dllexport) void deletedFunc() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
217 __declspec(dllexport) inline void deletedInlineFunc() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
226 template<typename T> __declspec(dllexport) void funcTmplDecl1();
227 template<typename T> void __declspec(dllexport) funcTmplDecl2();
230 template<typename T> __declspec(dllexport) void funcTmplDef() {}
233 template<typename T> __declspec(dllexport) inline void inlineFuncTmpl1() {}
236 template<typename T> __declspec(dllexport) inline void inlineFuncTmplDecl();
239 template<typename T> __declspec(dllexport) void inlineFuncTmplDef();
243 template<typename T> __declspec(dllexport) void funcTmplRedecl1();
244 template<typename T> __declspec(dllexport) void funcTmplRedecl1() {}
246 template<typename T> __declspec(dllexport) void funcTmplRedecl2();
250 template<typename T> __declspec(dllexport) void funcTmplRedecl3(); // expected-error{{redeclaration of 'funcTmplRedecl3' cannot add 'dllexport' attribute}}
253 template<typename T> __declspec(dllexport) inline void funcTmplRedecl4() {} // expected-error{{redeclaration of 'funcTmplRedecl4' cannot add 'dllexport' attribute}}
257 template<typename T> friend __declspec(dllexport) void funcTmplFriend1();
258 template<typename T> friend __declspec(dllexport) void funcTmplFriend2();
262 template<typename T> __declspec(dllexport) void funcTmplFriend1() {}
264 template<typename T> __declspec(dllexport) void funcTmplFriend3() {} // expected-error{{redeclaration of 'funcTmplFriend3' cannot add 'dllexport' attribute}}
265 template<typename T> __declspec(dllexport) inline void funcTmplFriend4() {} // expected-error{{redeclaration of 'funcTmplFriend4' cannot add 'dllexport' attribute}}
268 template<typename T> __declspec(dllexport) static int staticFuncTmpl(); // expected-error{{'staticFuncTmpl' must have external linkage when declared 'dllexport'}}
269 template<typename T> __declspec(dllexport) Internal internalRetFuncTmpl(); // expected-error{{'internalRetFuncTmpl' must have external linkage when declared 'dllexport'}}
270 namespace { template<typename T> __declspec(dllexport) void internalFuncTmpl(); } // expected-error{{'(anonymous namespace)::internalFuncTmpl' must have external linkage when declared 'dllexport'}}
271 namespace ns { template<typename T> __declspec(dllexport) void externalFuncTmpl(); }
275 template<typename T> __declspec(dllexport) void exportedFuncTmplDecl();
276 template<typename T> __declspec(dllexport) void exportedFuncTmpl() {}
290 template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Exported>();
291 template<> __declspec(dllexport) void exportedFuncTmpl<ExplicitSpec_Def_Exported>() {}
292 template<> __declspec(dllexport) inline void exportedFuncTmpl<ExplicitSpec_InlineDef_Exported>() {}
300 extern template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
301 template __declspec(dllexport) void funcTmpl<ExplicitDecl_Exported>();
304 template __declspec(dllexport) void funcTmpl<ExplicitInst_Exported>();
307 template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Exported>();
308 template<> __declspec(dllexport) void funcTmpl<ExplicitSpec_Def_Exported>() {}
309 template<> __declspec(dllexport) inline void funcTmpl<ExplicitSpec_InlineDef_Exported>() {}
317 class __declspec(dllexport) ClassDecl;
319 class __declspec(dllexport) ClassDef {};
325 template <typename T> struct __declspec(dllexport) PartiallySpecializedClassTemplate<T*> { void f() {} };
328 template <> struct __declspec(dllexport) ExpliciallySpecializedClassTemplate<int> { void f() {} };
336 template <typename T> class __declspec(dllexport) ExportedClassTemplate {};
337 template <typename T> class __declspec(dllimport) ImportedClassTemplate {};
345 template <> struct __declspec(dllexport) ExplicitlyExportSpecializedTemplate<int> { void func() {} };
347 template <> struct __declspec(dllimport) ExplicitlyImportSpecializedTemplate<int> { void func() {} };
355 template struct __declspec(dllexport) ExplicitlyExportInstantiatedTemplate<int>;
357 template struct __declspec(dllimport) ExplicitlyImportInstantiatedTemplate<int>;
360 class __declspec(dllexport) DerivedFromTemplate : public ClassTemplate<int> {};
363 class __declspec(dllexport) DerivedFromTemplate2 : public ClassTemplate<int> {};
366 class __declspec(dllexport) DerivedFromExportedTemplate : public ExportedClassTemplate<int> {};
369 class __declspec(dllexport) DerivedFromImportedTemplate : public ImportedClassTemplate<int> {};
377 class __declspec(dllexport) DerivedFromTemplateD2 : public ClassTemplate<double> {};
384 class __declspec(dllimport) DerivedFromTemplateB : public ClassTemplate<bool> {};
385 class __declspec(dllexport) DerivedFromTemplateB2 : public ClassTemplate<bool> {};
391 struct __declspec(dllexport) DerivedFromExplicitlySpecializedTemplate : public ExplicitlySpecializedTemplate<int> {};
394 struct __declspec(dllexport) DerivedFromExplicitlyExportSpecializedTemplate : public ExplicitlyExportSpecializedTemplate<int> {};
397 struct __declspec(dllexport) DerivedFromExplicitlyImportSpecializedTemplate : public ExplicitlyImportSpecializedTemplate<int> {};
403 struct __declspec(dllexport) DerivedFromExplicitlyInstantiatedTemplate : public ExplicitlyInstantiatedTemplate<int> {};
406 struct __declspec(dllexport) DerivedFromExplicitlyExportInstantiatedTemplate : public ExplicitlyExportInstantiatedTemplate<int> {};
409 struct __declspec(dllexport) DerivedFromExplicitlyImportInstantiatedTemplate : public ExplicitlyImportInstantiatedTemplate<int> {};
418 __declspec(dllimport) __declspec(dllexport) extern int PrecedenceExternGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
421 __declspec(dllexport) __declspec(dllimport) extern int PrecedenceExternGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
424 __declspec(dllimport) __declspec(dllexport) int PrecedenceGlobal1B; // expected-warning{{'dllimport' attribute ignored}}
427 __declspec(dllexport) __declspec(dllimport) int PrecedenceGlobal2B; // expected-warning{{'dllimport' attribute ignored}}
429 __declspec(dllexport) extern int PrecedenceExternGlobalRedecl1;
430 __declspec(dllimport) extern int PrecedenceExternGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
432 __declspec(dllimport) extern int PrecedenceExternGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
433 __declspec(dllexport) extern int PrecedenceExternGlobalRedecl2;
435 __declspec(dllexport) extern int PrecedenceGlobalRedecl1;
436 __declspec(dllimport) int PrecedenceGlobalRedecl1; // expected-warning{{'dllimport' attribute ignored}}
438 __declspec(dllimport) extern int PrecedenceGlobalRedecl2; // expected-warning{{'dllimport' attribute ignored}}
439 __declspec(dllexport) int PrecedenceGlobalRedecl2;
442 void __declspec(dllimport) __declspec(dllexport) precedence1B() {} // expected-warning{{'dllimport' attribute ignored}}
445 void __declspec(dllexport) __declspec(dllimport) precedence2B() {} // expected-warning{{'dllimport' attribute ignored}}
447 void __declspec(dllimport) precedenceRedecl1(); // expected-warning{{'dllimport' attribute ignored}}
448 void __declspec(dllexport) precedenceRedecl1() {}
450 void __declspec(dllexport) precedenceRedecl2();
451 void __declspec(dllimport) precedenceRedecl2() {} // expected-warning{{'dllimport' attribute ignored}}
462 __declspec(dllexport) void normalDef();
465 __declspec(dllexport) void normalDecl();
466 __declspec(dllexport) void normalDef();
467 __declspec(dllexport) void normalInclass() {}
468 __declspec(dllexport) void normalInlineDef();
469 __declspec(dllexport) inline void normalInlineDecl();
470 __declspec(dllexport) virtual void virtualDecl();
471 __declspec(dllexport) virtual void virtualDef();
472 __declspec(dllexport) virtual void virtualInclass() {}
473 __declspec(dllexport) virtual void virtualInlineDef();
474 __declspec(dllexport) virtual inline void virtualInlineDecl();
475 __declspec(dllexport) static void staticDecl();
476 __declspec(dllexport) static void staticDef();
477 __declspec(dllexport) static void staticInclass() {}
478 __declspec(dllexport) static void staticInlineDef();
479 __declspec(dllexport) static inline void staticInlineDecl();
482 __declspec(dllexport) void protectedDef();
484 __declspec(dllexport) void privateDef();
487 __declspec(dllexport) int Field; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
488 __declspec(dllexport) static int StaticField;
489 __declspec(dllexport) static int StaticFieldDef;
490 __declspec(dllexport) static const int StaticConstField;
491 __declspec(dllexport) static const int StaticConstFieldDef;
492 __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
493 __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
494 __declspec(dllexport) constexpr static int ConstexprField = 1;
495 __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
518 __declspec(dllexport) void normalDef();
519 __declspec(dllexport) void normalInlineDef();
520 __declspec(dllexport) inline void normalInlineDecl();
521 __declspec(dllexport) virtual void virtualDef();
522 __declspec(dllexport) virtual void virtualInlineDef();
523 __declspec(dllexport) virtual inline void virtualInlineDecl();
524 __declspec(dllexport) static void staticDef();
525 __declspec(dllexport) static void staticInlineDef();
526 __declspec(dllexport) static inline void staticInlineDecl();
528 __declspec(dllexport) static int StaticField;
529 __declspec(dllexport) static const int StaticConstField;
530 __declspec(dllexport) constexpr static int ConstexprField = 1;
533 __declspec(dllexport) void ExportMemberDefs::normalDef() {}
534 __declspec(dllexport) inline void ExportMemberDefs::normalInlineDef() {}
535 __declspec(dllexport) void ExportMemberDefs::normalInlineDecl() {}
536 __declspec(dllexport) void ExportMemberDefs::virtualDef() {}
537 __declspec(dllexport) inline void ExportMemberDefs::virtualInlineDef() {}
538 __declspec(dllexport) void ExportMemberDefs::virtualInlineDecl() {}
539 __declspec(dllexport) void ExportMemberDefs::staticDef() {}
540 __declspec(dllexport) inline void ExportMemberDefs::staticInlineDef() {}
541 __declspec(dllexport) void ExportMemberDefs::staticInlineDecl() {}
543 __declspec(dllexport) int ExportMemberDefs::StaticField;
544 __declspec(dllexport) const int ExportMemberDefs::StaticConstField = 1;
545 __declspec(dllexport) constexpr int ExportMemberDefs::ConstexprField;
550 __declspec(dllexport) ExportSpecials() {}
551 __declspec(dllexport) ~ExportSpecials();
552 __declspec(dllexport) inline ExportSpecials(const ExportSpecials&);
553 __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
554 __declspec(dllexport) ExportSpecials(ExportSpecials&&);
555 __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
569 __declspec(dllexport) void* operator new(__SIZE_TYPE__);
570 __declspec(dllexport) void* operator new[](__SIZE_TYPE__);
571 __declspec(dllexport) void operator delete(void*);
572 __declspec(dllexport) void operator delete[](void*);
582 __declspec(dllexport) ExportDeleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
583 __declspec(dllexport) ~ExportDeleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
584 __declspec(dllexport) ExportDeleted(const ExportDeleted&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
585 __declspec(dllexport) ExportDeleted& operator=(const ExportDeleted&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
586 __declspec(dllexport) ExportDeleted(ExportDeleted&&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
587 __declspec(dllexport) ExportDeleted& operator=(ExportDeleted&&) = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
588 __declspec(dllexport) void deleted() = delete; // expected-error{{attribute 'dllexport' cannot be applied to a deleted function}}
594 __declspec(dllexport) ExportDefaulted() = default;
595 __declspec(dllexport) ~ExportDefaulted() = default;
596 __declspec(dllexport) ExportDefaulted(const ExportDefaulted&) = default;
597 __declspec(dllexport) ExportDefaulted& operator=(const ExportDefaulted&) = default;
598 __declspec(dllexport) ExportDefaulted(ExportDefaulted&&) = default;
599 __declspec(dllexport) ExportDefaulted& operator=(ExportDefaulted&&) = default;
605 __declspec(dllexport) ExportDefaultedDefs();
606 __declspec(dllexport) ~ExportDefaultedDefs();
608 __declspec(dllexport) inline ExportDefaultedDefs(const ExportDefaultedDefs&);
609 __declspec(dllexport) ExportDefaultedDefs& operator=(const ExportDefaultedDefs&);
611 __declspec(dllexport) ExportDefaultedDefs(ExportDefaultedDefs&&);
612 __declspec(dllexport) ExportDefaultedDefs& operator=(ExportDefaultedDefs&&);
616 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default;
620 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
623 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
644 __declspec(dllexport) void MemberRedecl::normalDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalDef' cannot add 'dllexport' attribute}}
645 __declspec(dllexport) inline void MemberRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDef' cannot add 'dllexport' attribute}}
646 __declspec(dllexport) void MemberRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::normalInlineDecl' cannot add 'dllexport' attribute}}
647 __declspec(dllexport) void MemberRedecl::virtualDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualDef' cannot add 'dllexport' attribute}}
648 __declspec(dllexport) inline void MemberRedecl::virtualInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDef' cannot add 'dllexport' attribute}}
649 __declspec(dllexport) void MemberRedecl::virtualInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::virtualInlineDecl' cannot add 'dllexport' attribute}}
650 __declspec(dllexport) void MemberRedecl::staticDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticDef' cannot add 'dllexport' attribute}}
651 __declspec(dllexport) inline void MemberRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDef' cannot add 'dllexport' attribute}}
652 __declspec(dllexport) void MemberRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemberRedecl::staticInlineDecl' cannot add 'dllexport' attribute}}
654 __declspec(dllexport) int MemberRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticField' cannot add 'dllexport' attribute}}
655 __declspec(dllexport) const int MemberRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemberRedecl::StaticConstField' cannot add 'dllexport' attribute}}
656 __declspec(dllexport) constexpr int MemberRedecl::ConstexprField; // expected-error{{redeclaration of 'MemberRedecl::ConstexprField' cannot add 'dllexport' attribute}}
665 template<typename T> __declspec(dllexport) void normalDecl();
666 template<typename T> __declspec(dllexport) void normalDef();
667 template<typename T> __declspec(dllexport) void normalInclass() {}
668 template<typename T> __declspec(dllexport) void normalInlineDef();
669 template<typename T> __declspec(dllexport) inline void normalInlineDecl();
670 template<typename T> __declspec(dllexport) static void staticDecl();
671 template<typename T> __declspec(dllexport) static void staticDef();
672 template<typename T> __declspec(dllexport) static void staticInclass() {}
673 template<typename T> __declspec(dllexport) static void staticInlineDef();
674 template<typename T> __declspec(dllexport) static inline void staticInlineDecl();
677 template<typename T> __declspec(dllexport) static int StaticField;
678 template<typename T> __declspec(dllexport) static int StaticFieldDef;
679 template<typename T> __declspec(dllexport) static const int StaticConstField;
680 template<typename T> __declspec(dllexport) static const int StaticConstFieldDef;
681 template<typename T> __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
682 template<typename T> __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
683 template<typename T> __declspec(dllexport) constexpr static int ConstexprField = 1;
684 template<typename T> __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
718 template<typename T> __declspec(dllexport) void MemTmplRedecl::normalDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalDef' cannot add 'dllexport' attribute}}
719 template<typename T> __declspec(dllexport) inline void MemTmplRedecl::normalInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDef' cannot add 'dllexport' attribute}}
720 template<typename T> __declspec(dllexport) void MemTmplRedecl::normalInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::normalInlineDecl' cannot add 'dllexport' attribute}}
721 template<typename T> __declspec(dllexport) void MemTmplRedecl::staticDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticDef' cannot add 'dllexport' attribute}}
722 template<typename T> __declspec(dllexport) inline void MemTmplRedecl::staticInlineDef() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDef' cannot add 'dllexport' attribute}}
723 template<typename T> __declspec(dllexport) void MemTmplRedecl::staticInlineDecl() {} // expected-error{{redeclaration of 'MemTmplRedecl::staticInlineDecl' cannot add 'dllexport' attribute}}
726 template<typename T> __declspec(dllexport) int MemTmplRedecl::StaticField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticField' cannot add 'dllexport' attribute}}
727 template<typename T> __declspec(dllexport) const int MemTmplRedecl::StaticConstField = 1; // expected-error{{redeclaration of 'MemTmplRedecl::StaticConstField' cannot add 'dllexport' attribute}}
728 template<typename T> __declspec(dllexport) constexpr int MemTmplRedecl::ConstexprField; // expected-error{{redeclaration of 'MemTmplRedecl::ConstexprField' cannot add 'dllexport' attribute}}
735 template<typename T> __declspec(dllexport) void exportedNormal() {}
737 template<typename T> __declspec(dllexport) static void exportedStatic() {}
760 template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Exported>();
761 template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Def_Exported>() {}
762 template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal<ExplicitSpec_InlineDef_Exported>() {}
764 template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Exported>();
765 template<> __declspec(dllexport) void MemFunTmpl::exportedStatic<ExplicitSpec_Def_Exported>() {}
766 template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic<ExplicitSpec_InlineDef_Exported>() {}
776 extern template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
777 template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
779 extern template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
780 template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Exported>();
784 template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitInst_Exported>();
785 template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitInst_Exported>();
788 template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Exported>();
789 template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Exported>() {}
790 template<> __declspec(dllexport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Exported>() {}
792 template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Exported>();
793 template<> __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitSpec_Def_Exported>() {}
794 template<> __declspec(dllexport) inline void MemFunTmpl::staticDef<ExplicitSpec_InlineDef_Exported>() {}
801 template<typename T> __declspec(dllexport) static const int ExportedStaticVar = 1;
819 template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Exported>;
820 template<> __declspec(dllexport) const int MemVarTmpl::ExportedStaticVar<ExplicitSpec_Def_Exported> = 1;
829 extern template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
830 template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitDecl_Exported>;
834 template __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitInst_Exported>;
837 template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Exported>;
838 template<> __declspec(dllexport) const int MemVarTmpl::StaticVar<ExplicitSpec_Def_Exported> = 1;
851 __declspec(dllexport) void normalDecl();
852 __declspec(dllexport) void normalDef();
853 __declspec(dllexport) void normalInclass() {}
854 __declspec(dllexport) void normalInlineDef();
855 __declspec(dllexport) inline void normalInlineDecl();
856 __declspec(dllexport) virtual void virtualDecl();
857 __declspec(dllexport) virtual void virtualDef();
858 __declspec(dllexport) virtual void virtualInclass() {}
859 __declspec(dllexport) virtual void virtualInlineDef();
860 __declspec(dllexport) virtual inline void virtualInlineDecl();
861 __declspec(dllexport) static void staticDecl();
862 __declspec(dllexport) static void staticDef();
863 __declspec(dllexport) static void staticInclass() {}
864 __declspec(dllexport) static void staticInlineDef();
865 __declspec(dllexport) static inline void staticInlineDecl();
868 __declspec(dllexport) void protectedDef();
870 __declspec(dllexport) void privateDef();
873 __declspec(dllexport) int Field; // expected-warning{{'dllexport' attribute only applies to variables, functions and classes}}
874 __declspec(dllexport) static int StaticField;
875 __declspec(dllexport) static int StaticFieldDef;
876 __declspec(dllexport) static const int StaticConstField;
877 __declspec(dllexport) static const int StaticConstFieldDef;
878 __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
879 __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
880 __declspec(dllexport) constexpr static int ConstexprField = 1;
881 __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
921 template<typename T> __declspec(dllexport) void CTMR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMR::normalDef' cannot add 'dllexport' attribute}}
922 template<typename T> __declspec(dllexport) inline void CTMR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMR::normalInlineDef' cannot add 'dllexport' attribute}}
923 template<typename T> __declspec(dllexport) void CTMR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMR::normalInlineDecl' cannot add 'dllexport' attribute}}
924 template<typename T> __declspec(dllexport) void CTMR<T>::virtualDef() {} // expected-error{{redeclaration of 'CTMR::virtualDef' cannot add 'dllexport' attribute}}
925 template<typename T> __declspec(dllexport) inline void CTMR<T>::virtualInlineDef() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDef' cannot add 'dllexport' attribute}}
926 template<typename T> __declspec(dllexport) void CTMR<T>::virtualInlineDecl() {} // expected-error{{redeclaration of 'CTMR::virtualInlineDecl' cannot add 'dllexport' attribute}}
927 template<typename T> __declspec(dllexport) void CTMR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMR::staticDef' cannot add 'dllexport' attribute}}
928 template<typename T> __declspec(dllexport) inline void CTMR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMR::staticInlineDef' cannot add 'dllexport' attribute}}
929 template<typename T> __declspec(dllexport) void CTMR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMR::staticInlineDecl' cannot add 'dllexport' attribute}}
931 template<typename T> __declspec(dllexport) int CTMR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMR::StaticField' cannot add 'dllexport' attribute}}
932 template<typename T> __declspec(dllexport) const int CTMR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMR::StaticConstField' cannot add 'dllexport' attribute}}
933 template<typename T> __declspec(dllexport) constexpr int CTMR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMR::ConstexprField' cannot add 'dllexport' attribute}}
943 template<typename U> __declspec(dllexport) void normalDecl();
944 template<typename U> __declspec(dllexport) void normalDef();
945 template<typename U> __declspec(dllexport) void normalInclass() {}
946 template<typename U> __declspec(dllexport) void normalInlineDef();
947 template<typename U> __declspec(dllexport) inline void normalInlineDecl();
948 template<typename U> __declspec(dllexport) static void staticDecl();
949 template<typename U> __declspec(dllexport) static void staticDef();
950 template<typename U> __declspec(dllexport) static void staticInclass() {}
951 template<typename U> __declspec(dllexport) static void staticInlineDef();
952 template<typename U> __declspec(dllexport) static inline void staticInlineDecl();
955 template<typename U> __declspec(dllexport) static int StaticField;
956 template<typename U> __declspec(dllexport) static int StaticFieldDef;
957 template<typename U> __declspec(dllexport) static const int StaticConstField;
958 template<typename U> __declspec(dllexport) static const int StaticConstFieldDef;
959 template<typename U> __declspec(dllexport) static const int StaticConstFieldEqualInit = 1;
960 template<typename U> __declspec(dllexport) static const int StaticConstFieldBraceInit{1};
961 template<typename U> __declspec(dllexport) constexpr static int ConstexprField = 1;
962 template<typename U> __declspec(dllexport) constexpr static int ConstexprFieldDef = 1;
997 template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::normalDef() {} // expected-error{{redeclaration of 'CTMTR::normalDef' cannot add 'dllexport' attribute}}
998 template<typename T> template<typename U> __declspec(dllexport) inline void CTMTR<T>::normalInlineDef() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDef' cannot add 'dllexport' attribute}}
999 template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::normalInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::normalInlineDecl' cannot add 'dllexport' attribute}}
1000 template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::staticDef() {} // expected-error{{redeclaration of 'CTMTR::staticDef' cannot add 'dllexport' attribute}}
1001 template<typename T> template<typename U> __declspec(dllexport) inline void CTMTR<T>::staticInlineDef() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDef' cannot add 'dllexport' attribute}}
1002 template<typename T> template<typename U> __declspec(dllexport) void CTMTR<T>::staticInlineDecl() {} // expected-error{{redeclaration of 'CTMTR::staticInlineDecl' cannot add 'dllexport' attribute}}
1005 template<typename T> template<typename U> __declspec(dllexport) int CTMTR<T>::StaticField = 1; // expected-error{{redeclaration of 'CTMTR::StaticField' cannot add 'dllexport' attribute}}
1006 template<typename T> template<typename U> __declspec(dllexport) const int CTMTR<T>::StaticConstField = 1; // expected-error{{redeclaration of 'CTMTR::StaticConstField' cannot add 'dllexport' attribute}}
1007 template<typename T> template<typename U> __declspec(dllexport) constexpr int CTMTR<T>::ConstexprField; // expected-error{{redeclaration of 'CTMTR::ConstexprField' cannot add 'dllexport' attribute}}