[clang] [clang] Followup for constexpr-unknown potential constant expressions. (PR #151053)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 7 14:53:38 PDT 2025
================
@@ -563,8 +563,11 @@ bool Pointer::hasSameBase(const Pointer &A, const Pointer &B) {
if (A.isTypeidPointer() && B.isTypeidPointer())
return true;
- if (A.isIntegralPointer() || B.isIntegralPointer())
+ if (A.isIntegralPointer() || B.isIntegralPointer()) {
+ if (A.isTypeidPointer() || B.isTypeidPointer())
+ return false;
----------------
efriedma-quic wrote:
I was going to try to explain this... but then I realized the getSource() check isn't actually doing anything, so I just deleted this whole block of code.
https://github.com/llvm/llvm-project/pull/151053
More information about the cfe-commits
mailing list