[clang] [clang][Interp] Implement dynamic memory allocation handling (PR #70306)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 18 07:16:59 PDT 2024
================
@@ -2544,6 +2544,85 @@ bool ByteCodeExprGen<Emitter>::VisitCXXInheritedCtorInitExpr(
return this->emitCall(F, 0, E);
}
+template <class Emitter>
+bool ByteCodeExprGen<Emitter>::VisitCXXNewExpr(const CXXNewExpr *E) {
+ assert(classifyPrim(E->getType()) == PT_Ptr);
----------------
AaronBallman wrote:
I don't think this handles placement new correctly; that should probably have some FIXME comments + tests so we know to come back to it.
https://github.com/llvm/llvm-project/pull/70306
More information about the cfe-commits
mailing list