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

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 25 14:05:12 PDT 2025


================
@@ -2520,6 +2520,18 @@ class FunctionDecl : public DeclaratorDecl,
   /// If this function is an allocation/deallocation function that takes
   /// the `std::nothrow_t` tag, return true through IsNothrow,
   bool isReplaceableGlobalAllocationFunction(
+      std::optional<unsigned> *AlignmentParam = nullptr,
----------------
ojhunt wrote:

isReplaceableGlobalAllocationFunction is used for things like the static analyzers and asan, and I didn't think we would want a custom allocator to be silently treated as a default allocator, hence the separate "for constant evaluation" version.

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


More information about the cfe-commits mailing list