[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 19 14:58:25 PDT 2018
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks, this looks great.
================
Comment at: lib/Sema/SemaExprCXX.cpp:3458
+ }
+ TheCall->getCallee()->setType(OperatorNewOrDelete->getType());
+
----------------
It would be nice to assert that the callee you're setting the type of is an ImplicitCastExpr doing a BuiltinFnToFnPtr cast (just so that it's obvious that this is the only type we need to update and that it's freshly-created).
https://reviews.llvm.org/D43047
More information about the cfe-commits
mailing list