Skip to content

Commit ba67f3b

Browse files
committed
Add release note
1 parent 3005da1 commit ba67f3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,17 @@ C++ Specific Potentially Breaking Changes
148148
// Now diagnoses with an error.
149149
void f(int& i [[clang::lifetimebound]]);
150150

151+
- Clang now rejects all field accesses on null pointers in constant expressions. The following code
152+
used to work but will now be rejected:
153+
154+
.. code-block:: c++
155+
156+
struct S { int a; int b; };
157+
constexpr const int *p = &((S*)nullptr)->b;
158+
159+
Previously, this code was erroneously accepted.
160+
161+
151162
ABI Changes in This Version
152163
---------------------------
153164

0 commit comments

Comments
 (0)