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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to