[clang][Driver] Support simplified triple versions for config files (#111387)
[llvm-project.git] / clang / test / Headers / tgmath.c
blob4235ae20719fbaa6318d0e1dfb41f19c7f68fcc9
1 // RUN: %clang_cc1 -fsyntax-only -isystem %S/Inputs/include -verify %s
2 // expected-no-diagnostics
4 #include <tgmath.h>
6 float f;
7 double d;
8 long double l;
10 float complex fc;
11 double complex dc;
12 long double complex lc;
14 // creal
16 _Static_assert(sizeof(creal(f)) == sizeof(f), "");
17 _Static_assert(sizeof(creal(d)) == sizeof(d), "");
18 _Static_assert(sizeof(creal(l)) == sizeof(l), "");
20 _Static_assert(sizeof(creal(fc)) == sizeof(f), "");
21 _Static_assert(sizeof(creal(dc)) == sizeof(d), "");
22 _Static_assert(sizeof(creal(lc)) == sizeof(l), "");
24 // fabs
26 _Static_assert(sizeof(fabs(f)) == sizeof(f), "");
27 _Static_assert(sizeof(fabs(d)) == sizeof(d), "");
28 _Static_assert(sizeof(fabs(l)) == sizeof(l), "");
30 _Static_assert(sizeof(fabs(fc)) == sizeof(f), "");
31 _Static_assert(sizeof(fabs(dc)) == sizeof(d), "");
32 _Static_assert(sizeof(fabs(lc)) == sizeof(l), "");
34 // logb
36 _Static_assert(sizeof(logb(f)) == sizeof(f), "");
37 _Static_assert(sizeof(logb(d)) == sizeof(d), "");
38 _Static_assert(sizeof(logb(l)) == sizeof(l), "");