[clang] [SSAF][Extractor][Do not merge] Extract operator new/delete overload entities that shall retain their types (PR #206600)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 04:16:45 PDT 2026


================
@@ -0,0 +1,119 @@
+//===- OperatorNewDeletePointersExtractor.cpp -----------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Extractor implementation for extracting from user-provided operator
+// new/delete overloadings:
+//  1 return entities of operator new overloads;
+//  2 the parameter (optionally the 2nd)  of operator new overloads
+//    representing the pointer to a memory area to initialize the object at;
+//  3 the first parameter of operator delete overloads representing the pointer
+//    to a memory block to deallocate or a null pointer;
+//  4 the parameter (optionally the 2nd)  of operator delete overloads
+//    representing the pointer used as the placement parameter in the matching
+//    placement new.
+//
+//===----------------------------------------------------------------------===//
----------------
steakhal wrote:

I think we should write these comments as structured doxygen comments - even though right now they are not doxygen comments (they don't start with triple slashes `///`).
I'm pretty sure you need some decorator to introduce numbered lists. I think you should also start those lines with upper case.

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


More information about the cfe-commits mailing list