2016-07-16 04:41:10 +08:00
|
|
|
// RUN: %clang_cc1 -triple i686-windows -fdeclspec -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
__declspec(dllimport) typedef int typedef1;
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to functions, variables, classes, and Objective-C interfaces}}
|
2016-07-16 04:41:10 +08:00
|
|
|
typedef __declspec(dllimport) int typedef2;
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to}}
|
2016-07-16 04:41:10 +08:00
|
|
|
typedef int __declspec(dllimport) typedef3;
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to}}
|
2016-07-16 04:41:10 +08:00
|
|
|
typedef __declspec(dllimport) void (*FunTy)();
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to}}
|
2016-07-16 04:41:10 +08:00
|
|
|
enum __declspec(dllimport) E { Val };
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to}}
|
2016-07-16 04:41:10 +08:00
|
|
|
struct __declspec(dllimport) Record {};
|
2017-11-27 04:01:12 +08:00
|
|
|
// expected-warning@-1{{'dllimport' attribute only applies to}}
|
2016-07-16 04:41:10 +08:00
|
|
|
|
|
|
|
__declspec(dllimport)
|
|
|
|
__attribute__((__objc_root_class__))
|
|
|
|
@interface NSObject
|
|
|
|
@end
|
|
|
|
|
|
|
|
__declspec(dllimport)
|
|
|
|
@interface I : NSObject
|
|
|
|
- (void)method;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
- (void)method {
|
|
|
|
}
|
|
|
|
@end
|
|
|
|
|