Issue | 131654 |
---|---|
Summary | constexpr-unknown allows illegal pointer arithmetic |
Labels | clang:frontend |
Assignees | |
Reporter | efriedma-quic |
``` constexpr int f() { int &a = a; return &a+3-&a; } constexpr int z = f(); ```
Currently accepted with -std=c++23. Should be rejected: the pointer arithmetic is nonsense. CC @shafik @frederick-vs-ja
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs