Skip to content

Commit b42fb13

Browse files
committed
Fix one of the two failing tests, update release notes
It turns out someone filed an issue for this.
1 parent 133a8aa commit b42fb13

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@ Bug Fixes in This Version
664664
- Fixed a failed assertion when using ``__attribute__((noderef))`` on an
665665
``_Atomic``-qualified type (#GH116124).
666666
- No longer incorrectly diagnosing use of a deleted destructor when the
667-
selected overload of ``operator delete`` for that type is a destroying delete.
667+
selected overload of ``operator delete`` for that type is a destroying delete
668+
(#GH46818).
668669

669670
Bug Fixes to Compiler Builtins
670671
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

clang/test/SemaCXX/cxx2a-destroying-delete.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,17 @@ namespace dtor_access {
146146
struct S {
147147
void operator delete(S *p, std::destroying_delete_t);
148148
private:
149-
~S(); // expected-note {{here}}
149+
~S();
150150
};
151151

152-
// FIXME: PR47474: GCC accepts this, and it seems somewhat reasonable to
153-
// allow, even though [expr.delete]p12 says this is ill-formed.
154-
void f() { delete new S; } // expected-error {{calling a private destructor}}
152+
// C++20 [expr.delete]p12 says this is ill-formed, but GCC accepts and we
153+
// filed CWG2889 to resolve in the same way.
154+
void f() { delete new S; }
155155

156156
struct T {
157157
void operator delete(T *, std::destroying_delete_t);
158158
protected:
159-
virtual ~T(); // expected-note {{here}}
159+
virtual ~T();
160160
};
161161

162162
struct U : T {
@@ -165,7 +165,7 @@ namespace dtor_access {
165165
~U() override;
166166
};
167167

168-
void g() { delete (T *)new U; } // expected-error {{calling a protected destructor}}
168+
void g() { delete (T *)new U; }
169169
}
170170

171171
namespace delete_from_new {

0 commit comments

Comments
 (0)