================
@@ -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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to