• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clang -fsyntax-only -isystem %S/Inputs/include -Xclang -verify %s
2 // expected-no-diagnostics
3 
4 #include <tgmath.h>
5 
6 float f;
7 double d;
8 long double l;
9 
10 float complex fc;
11 double complex dc;
12 long double complex lc;
13 
14 // creal
15 
16 _Static_assert(sizeof(creal(f)) == sizeof(f), "");
17 _Static_assert(sizeof(creal(d)) == sizeof(d), "");
18 _Static_assert(sizeof(creal(l)) == sizeof(l), "");
19 
20 _Static_assert(sizeof(creal(fc)) == sizeof(f), "");
21 _Static_assert(sizeof(creal(dc)) == sizeof(d), "");
22 _Static_assert(sizeof(creal(lc)) == sizeof(l), "");
23 
24 // fabs
25 
26 _Static_assert(sizeof(fabs(f)) == sizeof(f), "");
27 _Static_assert(sizeof(fabs(d)) == sizeof(d), "");
28 _Static_assert(sizeof(fabs(l)) == sizeof(l), "");
29 
30 _Static_assert(sizeof(fabs(fc)) == sizeof(f), "");
31 _Static_assert(sizeof(fabs(dc)) == sizeof(d), "");
32 _Static_assert(sizeof(fabs(lc)) == sizeof(l), "");
33 
34 // logb
35 
36 _Static_assert(sizeof(logb(f)) == sizeof(f), "");
37 _Static_assert(sizeof(logb(d)) == sizeof(d), "");
38 _Static_assert(sizeof(logb(l)) == sizeof(l), "");
39