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 @@ -139,7 +139,7 @@ C++ Specific Potentially Breaking Changes
139
139
// Fixed version:
140
140
unsigned operator""_udl_name(unsigned long long);
141
141
142
- - Clang will now produce an error diagnostic when [[clang::lifetimebound]] is
142
+ - Clang will now produce an error diagnostic when `` [[clang::lifetimebound]] `` is
143
143
applied on a parameter or an implicit object parameter of a function that
144
144
returns void. This was previously ignored and had no effect. (#GH107556)
145
145
@@ -148,6 +148,21 @@ C++ Specific Potentially Breaking Changes
148
148
// Now diagnoses with an error.
149
149
void f(int& i [[clang::lifetimebound]]);
150
150
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
+
151
166
- Clang now rejects all field accesses on null pointers in constant expressions. The following code
152
167
used to work but will now be rejected:
153
168
You can’t perform that action at this time.
0 commit comments