31 lines · plain
1// RUN: %clang_cc1 -triple i686-windows -fdeclspec -fsyntax-only -verify %s2 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}}7typedef int __declspec(dllexport) typedef3;8// expected-warning@-1{{'dllexport' attribute only applies to}}9typedef __declspec(dllexport) void (*FunTy)(void);10// expected-warning@-1{{'dllexport' attribute only applies to}}11enum __declspec(dllexport) E { Val };12// expected-warning@-1{{'dllexport' attribute only applies to}}13struct __declspec(dllexport) Record {};14// expected-warning@-1{{'dllexport' attribute only applies to}}15 16__declspec(dllexport)17__attribute__((__objc_root_class__))18@interface NSObject19@end20 21__declspec(dllexport)22@interface I : NSObject23- (void)method;24@end25 26@implementation I27- (void)method {28}29@end30 31