[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-20 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/108902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-18 Thread Justin Bogner via cfe-commits
@@ -13,23 +13,23 @@ namespace hlsl { namespace __detail { -#define _HLSL_INLINE \ - __attribute__((__always_inline__, __nodebug__)) static inline bogner wrote: Note that while constexpr implies `inl

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/108902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-17 Thread via cfe-commits
https://github.com/joaosaffran approved this pull request. https://github.com/llvm/llvm-project/pull/108902 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-17 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/108902 >From 9deebd707410a6ad8474f615a97c943937ceeb34 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 16 Sep 2024 18:21:38 -0500 Subject: [PATCH 1/3] [HLSL] Make casting functions constexpr This marks the

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-17 Thread via cfe-commits
@@ -0,0 +1,10 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -verify + +// expected-no-diagnostics + +// Because asuint should be constant evaluated, all the static asserts below joaosaffran wrote: It looks like an upda

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz updated https://github.com/llvm/llvm-project/pull/108902 >From 9deebd707410a6ad8474f615a97c943937ceeb34 Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 16 Sep 2024 18:21:38 -0500 Subject: [PATCH 1/2] [HLSL] Make casting functions constexpr This marks the

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Chris B (llvm-beanz) Changes This marks the `bit_cast` helper as `constexpr` and allows the casts implemented with it to also be `constexpr`. This is largely not a functional change, but it enables using the casts in expressions tha

[clang] [HLSL] Make casting functions constexpr (PR #108902)

2024-09-16 Thread Chris B via cfe-commits
https://github.com/llvm-beanz created https://github.com/llvm/llvm-project/pull/108902 This marks the `bit_cast` helper as `constexpr` and allows the casts implemented with it to also be `constexpr`. This is largely not a functional change, but it enables using the casts in expressions that ne