1// RUN: %clang_cc1 -triple i686-windows -fdeclspec -fsyntax-only -verify %s 2 3__declspec(dllexport) typedef int typedef1; 4// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 5typedef __declspec(dllexport) int typedef2; 6// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 7typedef int __declspec(dllexport) typedef3; 8// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 9typedef __declspec(dllexport) void (*FunTy)(); 10// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 11enum __declspec(dllexport) E { }; 12// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 13#if __has_feature(cxx_strong_enums) 14enum class __declspec(dllexport) F { }; 15// expected-warning@-1{{'dllexport' attribute only applies to functions, variables, classes, and Objective-C interfaces}} 16#endif 17 18__declspec(dllexport) 19__attribute__((__objc_root_class__)) 20@interface NSObject 21@end 22 23__declspec(dllexport) 24@interface I : NSObject 25- (void)method; 26@end 27 28@implementation I 29- (void)method { 30} 31@end 32 33 34