File tree 3 files changed +7
-7
lines changed
3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1811,15 +1811,15 @@ class DecompositionDeclarator {
1811
1811
: Bindings(nullptr ), NumBindings(0 ), DeleteBindings(false ) {}
1812
1812
DecompositionDeclarator (const DecompositionDeclarator &G) = delete ;
1813
1813
DecompositionDeclarator &operator =(const DecompositionDeclarator &G) = delete ;
1814
- ~DecompositionDeclarator () {
1815
- if (DeleteBindings)
1816
- delete[] Bindings;
1817
- }
1814
+ ~DecompositionDeclarator () { clear (); }
1818
1815
1819
1816
void clear () {
1820
1817
LSquareLoc = RSquareLoc = SourceLocation ();
1821
1818
if (DeleteBindings)
1822
1819
delete[] Bindings;
1820
+ else
1821
+ llvm::for_each (llvm::MutableArrayRef (Bindings, NumBindings),
1822
+ [](Binding &B) { B.Attrs .reset (); });
1823
1823
Bindings = nullptr ;
1824
1824
NumBindings = 0 ;
1825
1825
DeleteBindings = false ;
Original file line number Diff line number Diff line change @@ -1115,7 +1115,7 @@ int64_t Decl::getID() const {
1115
1115
1116
1116
const FunctionType *Decl::getFunctionType (bool BlocksToo) const {
1117
1117
QualType Ty;
1118
- if (const auto *D = dyn_cast <BindingDecl>(this ))
1118
+ if (isa <BindingDecl>(this ))
1119
1119
return nullptr ;
1120
1120
else if (const auto *D = dyn_cast<ValueDecl>(this ))
1121
1121
Ty = D->getType ();
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ <h2 id="cxx26">C++2c implementation status</h2>
177
177
< tr >
178
178
< td > Attributes for Structured Bindings</ td >
179
179
< td > < a href ="https://wg21.link/P0609R3 "> P0609R3</ a > </ td >
180
- < td class ="none " align ="center "> No </ td >
180
+ < td class ="none " align ="center "> Clang 19 </ td >
181
181
</ tr >
182
182
< tr >
183
183
< td > Module Declarations Shouldn’t be Macros</ td >
@@ -187,7 +187,7 @@ <h2 id="cxx26">C++2c implementation status</h2>
187
187
< tr >
188
188
< td > Trivial infinite loops are not Undefined Behavior</ td >
189
189
< td > < a href ="https://wg21.link/P2809R3 "> P2809R3</ a > (< a href ="#dr "> DR</ a > )</ td >
190
- < td class ="unreleased " align ="center "> Clang 19 </ td >
190
+ < td class ="unreleased " align ="center "> No </ td >
191
191
</ tr >
192
192
< tr >
193
193
< td > Erroneous behaviour for uninitialized reads</ td >
You can’t perform that action at this time.
0 commit comments