[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

Nandor Licker via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 10:03:19 PDT 2019


nand added a comment.

> How do you intend to represent pointers cast to integer types? Allocating 64 bits of state for a 64-bit integer is insufficient to model that case.

Is this ever going to be allowed in constexpr? If that is the case, we'll add a separate type for all integers which are large enough to hold a pointer, a tagged union indicating whether the value is a number or a pointer. This would add significant overhead, but I don't see any other way which can correctly diagnose UB when casting a random integer to a pointer.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64146/new/

https://reviews.llvm.org/D64146





More information about the cfe-commits mailing list