1 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
2 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
3 //RUN: -ast-print -o - %s | FileCheck %s --check-prefix=PRINT
5 //RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fopenmp \
6 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses -DWIN -fms-compatibility \
7 //RUN: -ast-print -o - %s | FileCheck %s --check-prefixes=PRINT,PRINTW
9 //RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp \
10 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses \
11 //RUN: -ast-dump -o - %s | FileCheck %s --check-prefix=DUMP
13 //RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fopenmp \
14 //RUN: -Wno-source-uses-openmp -Wno-openmp-clauses -DWIN -fms-compatibility \
15 //RUN: -ast-dump -o - %s | FileCheck %s --check-prefixes=DUMP,DUMPW
17 typedef void *omp_interop_t
;
20 //DUMPW: FunctionDecl{{.*}}win_foov
21 //PRINTW: void win_foov(int n, double *y, void *interop_obj);
23 void win_foov(int n
, double *y
, void *interop_obj
);
25 //DUMPW: FunctionDecl{{.*}}win_foo
26 //DUMPW: OMPDeclareVariantAttr
27 //DUMPW-NEXT: DeclRefExpr{{.*}}win_foov
28 //PRINTW: #pragma omp declare variant(win_foov) match(construct={dispatch}, device={arch(x86_64)}) append_args(interop(targetsync))
29 //PRINTW: void win_foo(int n, double *y);
31 #pragma omp declare variant (win_foov) \
32 match(construct={dispatch}, device={arch(x86_64)}) \
33 append_args(interop(targetsync))
34 void _cdecl
win_foo(int n
, double *y
);
37 //DUMP: FunctionDecl{{.*}}c_foov
38 //PRINT: void c_foov(int n, double *y, void *interop_obj);
40 void c_foov(int n
, double *y
, void *interop_obj
);
42 //DUMP: FunctionDecl{{.*}}c_foo
43 //DUMP: OMPDeclareVariantAttr
44 //DUMP-NEXT: DeclRefExpr{{.*}}c_foov
45 //PRINT: #pragma omp declare variant(c_foov) match(construct={dispatch}, device={arch(x86_64)}) append_args(interop(targetsync))
46 //PRINT: void c_foo(int n, double *y);
48 #pragma omp declare variant (c_foov) \
49 match(construct={dispatch}, device={arch(x86_64)}) \
50 append_args(interop(targetsync))
51 void c_foo(int n
, double *y
);