[clang] [Clang][Bytecode] Fix void*-to-ptr casts originating from new/new[] (PR #174132)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 31 23:17:25 PST 2025
================
@@ -354,7 +354,8 @@ class Pointer {
if (const auto *CT = getFieldDesc()->getType()->getAs<VectorType>())
return CT->getElementType();
}
- return getFieldDesc()->getType();
+
+ return getFieldDesc()->getDataElemType();
----------------
keinflue wrote:
I replaced `->getType()` directly here in `Pointer::getType` instead of only the relevant use site in `PtrPtrCast`, but because `Pointer::getType` has many other users, I am not sure whether this is ok. Tests seem to pass though.
https://github.com/llvm/llvm-project/pull/174132
More information about the cfe-commits
mailing list