[PATCH] D43047: [Builtins] Overload __builtin_operator_new/delete to allow forwarding to usual allocation/deallocation functions.

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 21 12:21:30 PDT 2018


EricWF added inline comments.


================
Comment at: lib/Sema/SemaExprCXX.cpp:3458
+  }
+  TheCall->getCallee()->setType(OperatorNewOrDelete->getType());
+
----------------
rsmith wrote:
> 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).
Ack. Done.


https://reviews.llvm.org/D43047





More information about the cfe-commits mailing list