diff options
author | Eli Friedman <efriedma@quicinc.com> | 2025-09-02 12:20:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-02 12:20:13 -0700 |
commit | c62284c43d519317979e3028f7c37f42eed6ac8e (patch) | |
tree | 36906bb9cce0be631d08bb7f17b64b42e62abcae /clang/lib/AST/ByteCode/Pointer.cpp | |
parent | cf3a8876f4129f76884a67f6db9214adb7adedc6 (diff) | |
download | llvm-c62284c43d519317979e3028f7c37f42eed6ac8e.zip llvm-c62284c43d519317979e3028f7c37f42eed6ac8e.tar.gz llvm-c62284c43d519317979e3028f7c37f42eed6ac8e.tar.bz2 |
[clang] Followup for constexpr-unknown potential constant expressions. (#151053)
6a60f18997d62b0e2842a921fcb6beb3e52ed823 fixed the primary issue of
dereferences, but there are some expressions that depend on the identity
of the pointed-to object without actually accessing it. Handle those
cases.
Also, while I'm here, fix a crash in interpreter mode comparing typeid
to nullptr.
Diffstat (limited to 'clang/lib/AST/ByteCode/Pointer.cpp')
-rw-r--r-- | clang/lib/AST/ByteCode/Pointer.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/clang/lib/AST/ByteCode/Pointer.cpp b/clang/lib/AST/ByteCode/Pointer.cpp index 973bc7c..ef75b0d 100644 --- a/clang/lib/AST/ByteCode/Pointer.cpp +++ b/clang/lib/AST/ByteCode/Pointer.cpp @@ -627,9 +627,6 @@ bool Pointer::hasSameBase(const Pointer &A, const Pointer &B) { if (A.isTypeidPointer() && B.isTypeidPointer()) return true; - if (A.isIntegralPointer() || B.isIntegralPointer()) - return A.getSource() == B.getSource(); - if (A.StorageKind != B.StorageKind) return false; |