Skip to content

Commit b8daefa

Browse files
committed
release notes
1 parent b003a4d commit b8daefa

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ C++ Specific Potentially Breaking Changes
139139
// Fixed version:
140140
unsigned operator""_udl_name(unsigned long long);
141141

142-
- Clang will now produce an error diagnostic when [[clang::lifetimebound]] is
142+
- Clang will now produce an error diagnostic when ``[[clang::lifetimebound]]`` is
143143
applied on a parameter or an implicit object parameter of a function that
144144
returns void. This was previously ignored and had no effect. (#GH107556)
145145

@@ -148,6 +148,21 @@ C++ Specific Potentially Breaking Changes
148148
// Now diagnoses with an error.
149149
void f(int& i [[clang::lifetimebound]]);
150150

151+
- Clang will now produce an error diagnostic when ``[[clang::lifetimebound]]``
152+
is applied on a type (instead of a function parameter or an implicit object
153+
parameter); this includes the case when the attribute is specified for an
154+
unnamed function parameter. These were previously ignored and had no effect.
155+
(#GH118281)
156+
157+
.. code-block:: c++
158+
159+
// Now diagnoses with an error.
160+
int* [[clang::lifetimebound]] x;
161+
// Now diagnoses with an error.
162+
void f(int* [[clang::lifetimebound]] i);
163+
// Now diagnoses with an error.
164+
void g(int* [[clang::lifetimebound]]);
165+
151166
- Clang now rejects all field accesses on null pointers in constant expressions. The following code
152167
used to work but will now be rejected:
153168

0 commit comments

Comments
 (0)