[clang] Initial implementation of P2719 (PR #113510)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 10:00:21 PDT 2024
================
@@ -0,0 +1,302 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++2c -fcxx-type-aware-allocators -fexceptions
+// RUN: %clang_cc1 -fsyntax-only -verify %s -DTADD -std=c++2c -fcxx-type-aware-allocators -fcxx-type-aware-destroying-delete -fexceptions
+
+namespace std {
+ template <class T> struct type_identity {};
+ enum class align_val_t : __SIZE_TYPE__ {};
+ struct destroying_delete_t { explicit destroying_delete_t() = default; };
+}
+
+static_assert(__has_feature(cxx_type_aware_allocators));
+#ifdef TADD
+static_assert(__has_feature(cxx_type_aware_destroying_delete));
+#else
+static_assert(!__has_feature(cxx_type_aware_destroying_delete));
+#endif
+
+using size_t = __SIZE_TYPE__;
+
+void *operator new(size_t);
+void *operator new(size_t, std::align_val_t);
+void operator delete(void *);
+
+struct UntypedInclassNew {
+ void *operator new(size_t) = delete; // expected-note {{candidate function has been explicitly deleted}}
----------------
erichkeane wrote:
Please don't use notes like this, use the 'bookmarks' so we can see which diagnostic it is associated with.
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list