[clang] [clang] Update diagnostics for type aware allocators (PR #148576)

via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 14 00:28:47 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang

Author: Oliver Hunt (ojhunt)

<details>
<summary>Changes</summary>

Alas reflection pushed p2719 out of C++26, so this PR changes the diagnostics to reflect that for now type aware allocation is functionally a clang extension.

---

Patch is 29.00 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/148576.diff


13 Files Affected:

- (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+2-5) 
- (modified) clang/lib/Sema/SemaDeclCXX.cpp (+2-6) 
- (modified) clang/test/SemaCXX/type-aware-class-scoped-mismatched-constraints.cpp (+4-4) 
- (modified) clang/test/SemaCXX/type-aware-coroutines.cpp (+1-1) 
- (modified) clang/test/SemaCXX/type-aware-new-constexpr.cpp (+8-8) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-arrays.cpp (+4-4) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-basic-free-declarations.cpp (+4-4) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-basic-in-class-declarations.cpp (+35-35) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-basic-resolution.cpp (+4-4) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-qualifiers.cpp (+4-4) 
- (modified) clang/test/SemaCXX/type-aware-new-delete-transparent-contexts.cpp (+3-3) 
- (modified) clang/test/SemaCXX/type-aware-new-invalid-type-identity.cpp (+6-6) 
- (modified) clang/test/SemaCXX/type-aware-placement-operators.cpp (+4-4) 


``````````diff
diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td
index 577adc30ba2fa..2ea9e46dadcdf 100644
--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
@@ -10081,11 +10081,8 @@ def err_destroying_operator_delete_not_usual : Error<
 def err_type_aware_destroying_operator_delete : Error<
   "destroying delete is not permitted to be type aware">;
 
-def ext_cxx26_type_aware_allocators : ExtWarn<
-  "type aware allocators are a C++2c extension">, InGroup<CXX26>;
-def warn_cxx26_type_aware_allocators : Warning<
-  "type aware allocators are incompatible with C++ standards before C++2c">,
-  DefaultIgnore, InGroup<CXXPre26Compat>;
+def warn_ext_type_aware_allocators : ExtWarn<
+  "type aware allocators are a clang extension">, InGroup<DiagGroup<"cxx-type-aware-allocators">>;
 def err_type_aware_allocator_missing_matching_operator : Error<
   "declaration of type aware %0 in %1 must have matching type aware %2"
 >;
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp
index 5cc92ebb0171f..f60ab4f0da7a0 100644
--- a/clang/lib/Sema/SemaDeclCXX.cpp
+++ b/clang/lib/Sema/SemaDeclCXX.cpp
@@ -16541,12 +16541,8 @@ static inline bool CheckOperatorNewDeleteTypes(
   if (IsPotentiallyTypeAware) {
     // We don't emit this diagnosis for template instantiations as we will
     // have already emitted it for the original template declaration.
-    if (!FnDecl->isTemplateInstantiation()) {
-      unsigned DiagID = SemaRef.getLangOpts().CPlusPlus26
-                            ? diag::warn_cxx26_type_aware_allocators
-                            : diag::ext_cxx26_type_aware_allocators;
-      SemaRef.Diag(FnDecl->getLocation(), DiagID);
-    }
+    if (!FnDecl->isTemplateInstantiation())
+      SemaRef.Diag(FnDecl->getLocation(), diag::warn_ext_type_aware_allocators);
 
     if (OperatorKind == AllocationOperatorKind::New) {
       SizeParameterIndex = 1;
diff --git a/clang/test/SemaCXX/type-aware-class-scoped-mismatched-constraints.cpp b/clang/test/SemaCXX/type-aware-class-scoped-mismatched-constraints.cpp
index 57e6d953c2ad6..709635a1948ff 100644
--- a/clang/test/SemaCXX/type-aware-class-scoped-mismatched-constraints.cpp
+++ b/clang/test/SemaCXX/type-aware-class-scoped-mismatched-constraints.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fexceptions -fcxx-exceptions    -fsized-deallocation    -faligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=1
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fexceptions -fcxx-exceptions -fno-sized-deallocation    -faligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=0
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fexceptions -fcxx-exceptions    -fsized-deallocation -fno-aligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=1
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fexceptions -fcxx-exceptions -fno-sized-deallocation -fno-aligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=0
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fcxx-exceptions    -fsized-deallocation    -faligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=1
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fcxx-exceptions -fno-sized-deallocation    -faligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=0
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fcxx-exceptions    -fsized-deallocation -fno-aligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=1
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fcxx-exceptions -fno-sized-deallocation -fno-aligned-allocation -Wno-non-c-typedef-for-linkage -DDEFAULT_DELETE=0
 
 namespace std {
   template <class T> struct type_identity {};
diff --git a/clang/test/SemaCXX/type-aware-coroutines.cpp b/clang/test/SemaCXX/type-aware-coroutines.cpp
index a54d37c47dbd9..198347ca86734 100644
--- a/clang/test/SemaCXX/type-aware-coroutines.cpp
+++ b/clang/test/SemaCXX/type-aware-coroutines.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -fcoroutines -fexceptions -Wall -Wpedantic
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fcoroutines -fexceptions -Wall -Wpedantic
 
 
 #include "Inputs/std-coroutine.h"
diff --git a/clang/test/SemaCXX/type-aware-new-constexpr.cpp b/clang/test/SemaCXX/type-aware-new-constexpr.cpp
index 105610cd103e6..e6461ff40d7d4 100644
--- a/clang/test/SemaCXX/type-aware-new-constexpr.cpp
+++ b/clang/test/SemaCXX/type-aware-new-constexpr.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation    -faligned-allocation 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation    -faligned-allocation 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation -fno-aligned-allocation 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation -fno-aligned-allocation 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation    -faligned-allocation -fexperimental-new-constant-interpreter 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation    -faligned-allocation -fexperimental-new-constant-interpreter 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation -fno-aligned-allocation -fexperimental-new-constant-interpreter 
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation -fno-aligned-allocation -fexperimental-new-constant-interpreter 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation    -faligned-allocation 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation    -faligned-allocation 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation -fno-aligned-allocation 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation -fno-aligned-allocation 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation    -faligned-allocation -fexperimental-new-constant-interpreter 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation    -faligned-allocation -fexperimental-new-constant-interpreter 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation -fno-aligned-allocation -fexperimental-new-constant-interpreter 
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation -fno-aligned-allocation -fexperimental-new-constant-interpreter 
 
 
 namespace std {
diff --git a/clang/test/SemaCXX/type-aware-new-delete-arrays.cpp b/clang/test/SemaCXX/type-aware-new-delete-arrays.cpp
index b1c73236476c4..37781d1529223 100644
--- a/clang/test/SemaCXX/type-aware-new-delete-arrays.cpp
+++ b/clang/test/SemaCXX/type-aware-new-delete-arrays.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation    -faligned-allocation  -Wall -Wpedantic
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation    -faligned-allocation  -Wall -Wpedantic
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions -fno-sized-deallocation -fno-aligned-allocation  -Wall -Wpedantic
-// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -fexceptions    -fsized-deallocation -fno-aligned-allocation  -Wall -Wpedantic
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation    -faligned-allocation  -Wall -Wpedantic
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation    -faligned-allocation  -Wall -Wpedantic
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions -fno-sized-deallocation -fno-aligned-allocation  -Wall -Wpedantic
+// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++26 -Wno-cxx-type-aware-allocators -fexceptions    -fsized-deallocation -fno-aligned-allocation  -Wall -Wpedantic
 
 namespace std {
   template <class T> struct type_identity {};
diff --git a/clang/test/SemaCXX/type-aware-new-delete-basic-free-declarations.cpp b/clang/test/SemaCXX/type-aware-new-delete-basic-free-declarations.cpp
index c85b92718479a..e27e45d0e2f42 100644
--- a/clang/test/SemaCXX/type-aware-new-delete-basic-free-declarations.cpp
+++ b/clang/test/SemaCXX/type-aware-new-delete-basic-free-declarations.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s          -std=c++26    -fsized-deallocation    -faligned-allocation
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s          -std=c++26 -fno-sized-deallocation    -faligned-allocation
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s          -std=c++26 -fno-sized-deallocation -fno-aligned-allocation
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s          -std=c++26    -fsized-deallocation -fno-aligned-allocation
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -Wno-cxx-type-aware-allocators -std=c++26    -fsized-deallocation    -faligned-allocation
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -Wno-cxx-type-aware-allocators -std=c++26 -fno-sized-deallocation    -faligned-allocation
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -Wno-cxx-type-aware-allocators -std=c++26 -fno-sized-deallocation -fno-aligned-allocation
+// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s -Wno-cxx-type-aware-allocators -std=c++26    -fsized-deallocation -fno-aligned-allocation
 
 namespace std {
   template <class T> struct type_identity {};
diff --git a/clang/test/SemaCXX/type-aware-new-delete-basic-in-class-declarations.cpp b/clang/test/SemaCXX/type-aware-new-delete-basic-in-class-declarations.cpp
index 34bd1d4206be1..af1a86f490c80 100644
--- a/clang/test/SemaCXX/type-aware-new-delete-basic-in-class-declarations.cpp
+++ b/clang/test/SemaCXX/type-aware-new-delete-basic-in-class-declarations.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify=expected,precxx26 %s           -std=c++23
-// RUN: %clang_cc1 -triple arm64-apple-macosx -fsyntax-only -verify %s                             -std=c++26
+// RUN: %clang_cc1 -triple arm64-apple-macosx -std=c++26 -fsyntax-only -verify=expected,clangext %s
+// RUN: %clang_cc1 -triple arm64-apple-macosx -std=c++26 -Wno-cxx-type-aware-allocators -fsyntax-only -verify %s
 
 namespace std {
   template <class T> struct type_identity {};
@@ -13,24 +13,24 @@ using size_t = __SIZE_TYPE__;
 struct S {
   void *operator new(std::type_identity<S>, size_t, std::align_val_t); // #1
   void operator delete(std::type_identity<S>, void *, size_t, std::align_val_t); // #2
-  // precxx26-warning@#1 {{type aware allocators are a C++2c extension}}
-  // precxx26-warning@#2 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#1 {{type aware allocators are a clang extension}}
+  // clangext-warning@#2 {{type aware allocators are a clang extension}}
   void operator delete(S *, std::destroying_delete_t);
 };
 
 template <typename T> struct S2 {
   void *operator new(std::type_identity<S2<T>>, size_t, std::align_val_t); // #3
   void operator delete(std::type_identity<S2<T>>, void *, size_t, std::align_val_t); // #4
-  // precxx26-warning@#3 {{type aware allocators are a C++2c extension}}
-  // precxx26-warning@#4 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#3 {{type aware allocators are a clang extension}}
+  // clangext-warning@#4 {{type aware allocators are a clang extension}}
   void operator delete(S2 *, std::destroying_delete_t);
 };
 
 struct S3 {
   template <typename T> void *operator new(std::type_identity<T>, size_t, std::align_val_t); // #5
   template <typename T> void operator delete(std::type_identity<T>, void *, size_t, std::align_val_t); // #6
-  // precxx26-warning@#5 {{type aware allocators are a C++2c extension}}
-  // precxx26-warning@#6 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#5 {{type aware allocators are a clang extension}}
+  // clangext-warning@#6 {{type aware allocators are a clang extension}}
   void operator delete(S3 *, std::destroying_delete_t);
 };
 
@@ -38,34 +38,34 @@ struct S4 {
   template <typename T> void *operator new(std::type_identity<T>, size_t, std::align_val_t); // #7
   template <typename T> void operator delete(std::type_identity<T>, void *, size_t, std::align_val_t); // #8
   template <typename T> void operator delete(std::type_identity<T>, S4 *, std::destroying_delete_t, size_t, std::align_val_t); // #9
-  // precxx26-warning@#7 {{type aware allocators are a C++2c extension}}
-  // precxx26-warning@#8 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#7 {{type aware allocators are a clang extension}}
+  // clangext-warning@#8 {{type aware allocators are a clang extension}}
   // expected-error@#9 {{destroying delete is not permitted to be type aware}}
 };
 
 struct S5 {
   template <typename T> void operator delete(std::type_identity<T>, T *, size_t, std::align_val_t); // #10
   // expected-error@#10 {{type aware 'operator delete' cannot take a dependent type as its 2nd parameter}}
-  // precxx26-warning@#10 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#10 {{type aware allocators are a clang extension}}
 };
 
 struct S6 {
   template <typename T> void *operator new(std::type_identity<S6>, T, std::align_val_t); // #11
   // expected-error@#11 {{type aware 'operator new' cannot take a dependent type as its 2nd parameter}}
-  // precxx26-warning@#11 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#11 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(std::type_identity<S6>, T, size_t, std::align_val_t); // #12
   // expected-error@#12 {{type aware 'operator delete' cannot take a dependent type as its 2nd parameter}}
-  // precxx26-warning@#12 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#12 {{type aware allocators are a clang extension}}
 };
 
 template <typename U>
 struct S7 {
   template <typename T> void *operator new(std::type_identity<T>, U, std::align_val_t); // #13
   // expected-error@#13 {{type aware 'operator new' cannot take a dependent type as its 2nd parameter;}}
-  // precxx26-warning@#13 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#13 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(std::type_identity<T>, U, size_t, std::align_val_t); // #14
   // expected-error@#14 {{type aware 'operator delete' cannot take a dependent type as its 2nd parameter;}}
-  // precxx26-warning@#14 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#14 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(std::type_identity<T>, S7 *, std::destroying_delete_t, U, std::align_val_t); // #15
   // expected-error@#15 {{destroying delete is not permitted to be type aware}}
   void operator delete(S7 *, std::destroying_delete_t, U); // #16
@@ -80,10 +80,10 @@ void f() {
 struct S8 {
   template <typename T, typename U> void *operator new(std::type_identity<T>, U, std::align_val_t); // #17
   // expected-error@#17 {{type aware 'operator new' cannot take a dependent type as its 2nd parameter;}}
-  // precxx26-warning@#17 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#17 {{type aware allocators are a clang extension}}
   template <typename T, typename U> void operator delete(std::type_identity<T>, U, size_t, std::align_val_t); // #18
   // expected-error@#18 {{type aware 'operator delete' cannot take a dependent type as its 2nd parameter;}}
-  // precxx26-warning@#18 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#18 {{type aware allocators are a clang extension}}
   template <typename T, typename U> void operator delete(std::type_identity<T>, S8 *, std::destroying_delete_t, U, std::align_val_t); // #19
   // expected-error@#19 {{destroying delete is not permitted to be type aware}}
 };
@@ -95,23 +95,23 @@ using UsingAlias = std::type_identity<float>;
 struct S9 {
   void *operator new(Alias<size_t>, std::align_val_t);
   template <typename T> void *operator new(Alias<std::type_identity<T>>, Alias<size_t>, std::align_val_t); // #20
-  // precxx26-warning@#20 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#20 {{type aware allocators are a clang extension}}
   void *operator new(Alias<std::type_identity<int>>, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(Alias<std::type_identity<T>>, void *, size_t, std::align_val_t); // #21
-  // precxx26-warning@#21{{type aware allocators are a C++2c extension}}
+  // clangext-warning@#21{{type aware allocators are a clang extension}}
   void operator delete(Alias<std::type_identity<int>>, void *, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
 };
 struct S10 {
   template <typename T> void *operator new(TypeIdentityAlias<T>, size_t, std::align_val_t); // #22
-  // precxx26-warning@#22 {{type aware allocators are a C++2c extension}}
+  // clangext-warning@#22 {{type aware allocators are a clang extension}}
   void *operator new(TypeIdentityAlias<int>, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(TypeIdentityAlias<T>, void *, size_t, std::align_val_t); // #23
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   void operator delete(TypeIdentityAlias<int>, void *, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
 };
 
 void test() {
@@ -123,28 +123,28 @@ void test() {
 
 struct S11 {
   template <typename T> void *operator new(TypedefAlias, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   void *operator new(TypedefAlias, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   template <typename T> void operator delete(TypedefAlias, void *, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
   void operator delete(TypedefAlias, void *, size_t, std::align_val_t);
-  // precxx26-warning at -1 {{type aware allocators are a C++2c extension}}
+  // clangext-warning at -1 {{type aware allocators are a clang extension}}
 };
 struct S12 {
   template <typename T> void *operator new(U...
[truncated]

``````````

</details>


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


More information about the cfe-commits mailing list