--- /dev/null
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+
+@interface Test
+- (void)test;
+@end
+
+@implementation Test
+- (void)test __attribute__((stdcall)) {
+ // CHECK: define{{.*}}x86_stdcallcc{{.*}}Test test
+}
+@end
typedef void typedef_fun_t(int);
typedef_fun_t typedef_fun; // expected-note {{previous declaration is here}}
void __attribute__((stdcall)) typedef_fun(int x) { } // expected-error {{function declared 'stdcall' here was previously declared without calling convention}}
+
+struct type_test {} __attribute__((stdcall)); // expected-warning {{'stdcall' attribute only applies to functions and methods}}
- (NSString *)stringByAppendingFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
-(void) m0 __attribute__((noreturn));
-(void) m1 __attribute__((unused));
+-(void) m2 __attribute__((stdcall));
@end
return self;
}
@end
+
+__attribute__((cdecl)) // expected-warning {{'cdecl' attribute only applies to functions and methods}}
+@interface Complain
+@end