How to forcibly insert placement_new after malloc?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to forcibly insert placement_new after malloc?

Kristof Beyls via cfe-dev
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.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev