[clang] [clang][bytecode] Fix void*-to-ptr casts originating from new/new[] (PR #174132)
Shafik Yaghmour via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 2 15:25:54 PST 2026
================
@@ -433,6 +433,22 @@ QualType Descriptor::getDataType(const ASTContext &Ctx) const {
return getType();
}
+QualType Descriptor::getDataElemType() const {
+ if (const auto *E = asExpr()) {
----------------
shafik wrote:
We do this dance in `getDataType()` as well. This code duplication is bad, if anything changes/needs fixing, we need to update this code in both places and likely we will eventually forget and they will diverge.
This should be refactored so the common code is in one place in some fashion.
https://github.com/llvm/llvm-project/pull/174132
More information about the cfe-commits
mailing list