Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / expr / p9.cpp
blob4c60b8ba62e422215d27a184a6f5eb5a65d2dad9
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 // floating-point overloads
6 __typeof__(0 + 0.0L) ld0;
7 long double &ldr = ld0;
9 __typeof__(0 + 0.0) d0;
10 double &dr = d0;
12 __typeof__(0 + 0.0f) f0;
13 float &fr = f0;
15 // integral promotions
17 signed char c0;
18 __typeof__(c0 + c0) c1;
19 int &cr = c1;
21 unsigned char uc0;
22 __typeof__(uc0 + uc0) uc1;
23 int &ucr = uc1;
25 short s0;
26 __typeof__(s0 + s0) s1;
27 int &sr = s1;
29 unsigned short us0;
30 __typeof__(us0 + us0) us1;
31 int &usr = us1;
33 // integral overloads
35 __typeof__(0 + 0UL) ul0;
36 unsigned long &ulr = ul0;
38 template<bool T> struct selector;
39 template<> struct selector<true> { typedef long type; };
40 template<> struct selector<false> {typedef unsigned long type; };
41 __typeof__(0U + 0L) ui_l0;
42 selector<(sizeof(long) > sizeof(unsigned int))>::type &ui_lr = ui_l0;
44 __typeof__(0 + 0L) l0;
45 long &lr = l0;
47 __typeof__(0 + 0U) u0;
48 unsigned &ur = u0;
50 __typeof__(0 + 0) i0;
51 int &ir = i0;