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