[clang] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 4 06:43:16 PST 2024


================
@@ -163,6 +170,40 @@ void attribute_const() {
   std::as_const(n); // expected-warning {{ignoring return value}}
 }
 
+struct D {
+  void* operator new(__SIZE_TYPE__, D&&(*)(D&));
+  void* operator new(__SIZE_TYPE__, D*(*)(D&));
+  void* operator new(__SIZE_TYPE__, const D&(*)(D&));
+};
+
+#if __cplusplus <= 201703L
----------------
erichkeane wrote:

I realize elsewhere does this... but please use `-verify=cpp20,expected` and `-verify=cpp17,expected`, then make these `cpp17-warning` and `cpp20-error`.

An NFC followup to clean up the other uses here would also be appreciated, but not necessary.  @Endilll has been doing similar cleanups elsewhere.

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


More information about the cfe-commits mailing list