brintos

brintos / llvm-project-archived public Read only

0
0
Text · 354 B · fb90d92 Raw
11 lines · plain
1// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify2 3// expected-no-diagnostics4 5// Because asfloat should be constant evaluated, all the static asserts below6// should work!7void ConstExprTest() {8  static_assert(asfloat(0x3f800000) == 1.0f, "One");9  static_assert(asfloat(0x40000000.xxx).y == 2.0f, "Two");10}11