[clang] [Clang] Improve diagnostics for 'placement new' with const storage argument (PR #144270)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 15 12:48:31 PDT 2025


================
@@ -2753,10 +2753,18 @@ static bool resolveAllocationOverloadInterior(
     if (Diagnose) {
       // If this is an allocation of the form 'new (p) X' for some object
       // pointer p (or an expression that will decay to such a pointer),
-      // diagnose the missing inclusion of <new>.
+      // diagnose potential error.
----------------
ojhunt wrote:

pedantic: "diagnose the reason for the error."

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


More information about the cfe-commits mailing list