llvm-project
2067574f - [clang] Fix pointer comparisons between pointers to constexpr-unknown (#147663)

Commit
111 days ago
[clang] Fix pointer comparisons between pointers to constexpr-unknown (#147663) A constexpr-unknown reference can be equal to an arbitrary value, except values allocated during constant evaluation. Fix the handling. The standard is unclear exactly which pointer comparisons count as "unknown" in this context; for example, in some cases we could use alignment to prove two constexpr-unknown references are not equal. I decided to ignore all the cases involving variables not allocated during constant evaluation. While looking at this, I also spotted that there might be issues with lifetimes, but I didn't try to address it. (cherry picked from commit 20c8e3c2a4744524396cc473a370cfb7855850b6)
Author
Committer
tru tru
Parents
Loading