diff options
author | Oliver Hunt <oliver@apple.com> | 2025-07-14 19:20:36 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-07-14 19:20:36 -0700 |
commit | 7cde97423347d8f7eb4a3967f98b274be8ff621f (patch) | |
tree | faf0c5ab58fda160663fad1cf59c2da8226b9cf4 /clang/lib/Sema | |
parent | 1ddb909a422853bd8e2692a8d369b45d62cec3e5 (diff) | |
download | llvm-7cde97423347d8f7eb4a3967f98b274be8ff621f.zip llvm-7cde97423347d8f7eb4a3967f98b274be8ff621f.tar.gz llvm-7cde97423347d8f7eb4a3967f98b274be8ff621f.tar.bz2 |
[clang] Update diagnostics and documentation for type aware allocators (#148576)
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.
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaDeclCXX.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaDeclCXX.cpp b/clang/lib/Sema/SemaDeclCXX.cpp index 5cc92eb..f60ab4f 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; |