[clang] One more fix for P3144R2 implementation (PR #149406)
Harald van Dijk via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 22 17:13:37 PDT 2025
================
@@ -595,6 +595,10 @@ struct GH99278_2 {
} f;
};
GH99278_2<void> e;
+void GH99278_3(int(*p)[]) {
+ delete p;
+ // expected-warning at -1 {{'delete' applied to a pointer-to-array type 'int (*)[]' treated as 'delete[]'}}
+};
----------------
hvdijk wrote:
I've changed the array tests to use `delete []` so that they test something useful, so that they test something that could be valid even for non-null pointers.
https://github.com/llvm/llvm-project/pull/149406
More information about the cfe-commits
mailing list