[llvm-branch-commits] [Clang] Implement constexpr evaluation for __builtin_infer_alloc_token() (PR #163639)

Marco Elver via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Oct 15 14:29:33 PDT 2025


https://github.com/melver created https://github.com/llvm/llvm-project/pull/163639

Implement the constexpr evaluation for `__builtin_infer_alloc_token()`
in Clang's constant expression evaluators (both in ExprConstant and the
new bytecode interpreter).

The constant evaluation is only supported for stateless (hash-based)
token modes. If a stateful mode like `increment` is used, the evaluation
fails, as the token value is not deterministic at compile time.





More information about the llvm-branch-commits mailing list