[clang] Handle __declspec() attributes in using
[llvm-project.git] / clang / test / CodeGen / call.c
blob32ac4f8287c1ad839c5f2fbed7abd78e11aacef5
1 // RUN: %clang %s -O0 -Wno-strict-prototypes -emit-llvm -S -o - | FileCheck %s
3 // This should call rb_define_global_function, not rb_f_chop.
4 void rb_define_global_function (const char*,void(*)(void),int);
5 static void rb_f_chop(void);
6 void Init_String(void) {
7 rb_define_global_function("chop", rb_f_chop, 0);
9 static void rb_f_chop(void) {
12 // CHECK: call{{.*}}rb_define_global_function
14 // PR10335
15 typedef void (* JSErrorCallback)(void);
16 void js_GetErrorMessage(void);
17 void JS_ReportErrorNumber(JSErrorCallback errorCallback, ...);
18 void Interpret(void) {
19 JS_ReportErrorNumber(js_GetErrorMessage, 0);
21 // CHECK: call {{.*}}void ({{.*}}, ...) @JS_ReportErrorNumber({{.*}}@js_GetErrorMessage
27 // PR10337
28 struct sigaction { int (*_sa_handler)(int); };
29 typedef int SigHandler (void);
30 typedef struct sigaction sighandler_cxt;
31 SigHandler *rl_set_sighandler(ohandler)
32 sighandler_cxt *ohandler; {
33 return 0;
36 void rl_set_signals(void) {
37 SigHandler *oh;
38 oh = rl_set_sighandler(0);