================ @@ -256,7 +256,8 @@ static Value AllocateObject(TypeDecl *TD, Interpreter &Interp) { // cantFail(Interp.ParseAndExecute("new " + Name + "()", &Addr)); // The lifetime of the temporary is extended by the clang::Value. - cantFail(Interp.ParseAndExecute(Name + "()", &Addr)); + cantFail(Interp.ParseAndExecute(Name + "();", &Addr)); + Addr.setKind(Value::Kind::K_PtrOrObj); ---------------- vgvassilev wrote:
Could you explain why we need this? The missing semicolon on the previous line is on purpose. This tells the interpreter to store its result into the Value object. https://github.com/llvm/llvm-project/pull/79119 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits