Skip to content

Commit 0b0452f

Browse files
committed
[clang] Add the breaking change to more correctly check covariance when return type doesn't point to a class to release notes.
1 parent 6aa8230 commit 0b0452f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ C++ Specific Potentially Breaking Changes
9999
// Was error, now evaluates to false.
100100
constexpr bool b = f() == g();
101101
102+
- Clang will now correctly not consider pointers to non classes for covariance.
103+
104+
.. code-block:: c++
105+
106+
struct A {
107+
virtual const int *f() const;
108+
};
109+
struct B : A {
110+
// Return type has less cv-qualification but doesn't point to a class.
111+
// Error will be generated.
112+
int *f() const override;
113+
};
114+
102115
ABI Changes in This Version
103116
---------------------------
104117

0 commit comments

Comments
 (0)