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

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 30 02:29:58 PST 2025


================
@@ -3384,7 +3386,7 @@ bool FunctionDecl::isReservedGlobalPlacementOperator() const {
   return (proto->getParamType(1).getCanonicalType() == Context.VoidPtrTy);
 }
 
-bool FunctionDecl::isReplaceableGlobalAllocationFunction(
+bool FunctionDecl::isConstEvalSafeOrReplaceableGlobalAllocationFunction(
----------------
cor3ntin wrote:

```suggestion
bool FunctionDecl::isUsableAsReplaceableGlobalAllocationFunctionInConstantEvaluation(
```

Maybe something like that (lets avoid `consteval`) - it's a mouthful but I don't have better.
maybe `Replaceable` is superfluous

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


More information about the cfe-commits mailing list