[clang] [RFC] Initial implementation of P2719 (PR #113510)

via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 6 01:38:33 PST 2024


================
@@ -3357,6 +3357,10 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const {
     return false;
 
   const auto *proto = getType()->castAs<FunctionProtoType>();
+  if (proto->getNumParams() < 2)
+    return false;
+  if (proto->getParamType(0)->isTypeIdentitySpecialization())
+    return false;
----------------
cor3ntin wrote:

We probably don't need to compare getNumParams() twice (line below)

https://github.com/llvm/llvm-project/pull/113510


More information about the cfe-commits mailing list