File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ C++ Specific Potentially Breaking Changes
147
147
// Fixed version:
148
148
unsigned operator""_udl_name(unsigned long long);
149
149
150
- - Clang will now produce an error diagnostic when [[clang::lifetimebound]] is
150
+ - Clang will now produce an error diagnostic when `` [[clang::lifetimebound]] `` is
151
151
applied on a parameter or an implicit object parameter of a function that
152
152
returns void. This was previously ignored and had no effect. (#GH107556)
153
153
@@ -156,6 +156,21 @@ C++ Specific Potentially Breaking Changes
156
156
// Now diagnoses with an error.
157
157
void f(int& i [[clang::lifetimebound]]);
158
158
159
+ - Clang will now produce an error diagnostic when ``[[clang::lifetimebound]] ``
160
+ is applied on a type (instead of a function parameter or an implicit object
161
+ parameter); this includes the case when the attribute is specified for an
162
+ unnamed function parameter. These were previously ignored and had no effect.
163
+ (#GH118281)
164
+
165
+ .. code-block :: c++
166
+
167
+ // Now diagnoses with an error.
168
+ int* [[clang::lifetimebound]] x;
169
+ // Now diagnoses with an error.
170
+ void f(int* [[clang::lifetimebound]] i);
171
+ // Now diagnoses with an error.
172
+ void g(int* [[clang::lifetimebound]]);
173
+
159
174
- Clang now rejects all field accesses on null pointers in constant expressions. The following code
160
175
used to work but will now be rejected:
161
176
You can’t perform that action at this time.
0 commit comments