clang/test/SemaHLSL/BuiltIns/asuint-constexpr.hlsl
raw| 1 | // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify |
| 2 | |
| 3 | // expected-no-diagnostics |
| 4 | |
| 5 | // Because asuint should be constant evaluated, all the static asserts below |
| 6 | // should work! |
| 7 | void ConstExprTest() { |
| 8 | static_assert(asuint(1) == 1u, "One"); |
| 9 | static_assert(asuint(2.xxx).y == 2u, "Two"); |
| 10 | } |