[clang] [Clang] Change how the argument of a delete expression is converted (PR #92814)

Vlad Serebrennikov via cfe-commits cfe-commits at lists.llvm.org
Mon May 20 13:00:34 PDT 2024


================
@@ -1245,12 +1245,7 @@ namespace cwg599 { // cwg599: partial
     // expected-error at -1 {{cannot delete expression with pointer-to-'void' type 'void *'}}
     delete t;
     // expected-error at -1 {{cannot delete expression of type 'T'}}
-    // FIXME: This is valid, but is rejected due to a non-conforming GNU
-    // extension allowing deletion of pointers to void.
     delete u;
-    // expected-error at -1 {{ambiguous conversion of delete expression of type 'U' to a pointer}}
----------------
Endilll wrote:

Hmm, do you understand how the Standard works here? It speaks of conversion to pointer to object type, without clarifying what the target type is.

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


More information about the cfe-commits mailing list