[Lldb-commits] [PATCH] D113498: [lldb] Constant-resolve operands to `getelementptr`
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Nov 17 18:15:34 PST 2021
shafik added a comment.
So `(int*)100` can't be a constant expression b/c it is basically a `reinterpret_cast` and that is forbidden in a constant expression e.g.:
constexpr const int* ip2 = (int*)100;
is ill-formed.
On the other hand this is a well-formed constant expression:
static const int x =0;
constexpr const int* ip1 = &x + 1;
Does that get you the test case you need?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113498/new/
https://reviews.llvm.org/D113498
More information about the lldb-commits
mailing list