[cfe-dev] How to forcibly insert placement_new after malloc?

Yuseok Jeon via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 17 22:35:10 PDT 2019


Hi, all.

I want to insert "placement_new"  after "malloc"  to call the constructor (to initialize vtable ptr) when the allocated object is a polymorphic object.
Could I forcibly insert "placement_new" after "malloc" in the clang level (e.g., modify clang to use "CXXNewEXpr::Create()") without modifying AST tree?
If not, could you please tell me the way?

Best Regards,
Y. Jeon.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191018/a2cd49bb/attachment.html>


More information about the cfe-dev mailing list