File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,7 @@ Bug Fixes to Attribute Support
500500- Fixes crashes or missing diagnostics with the `device_kernel ` attribute. (#GH161905)
501501- Fix handling of parameter indexes when an attribute is applied to a C++23 explicit object member function.
502502- Fixed several false positives and false negatives in function effect (`nonblocking `) analysis. (#GH166078) (#GH166101) (#GH166110)
503- - Fix ``cleanup `` attribute by delaying type checks after the type is deduced. (#GH129631)
503+ - Fix ``cleanup `` attribute by delaying type checks until after the type is deduced. (#GH129631)
504504
505505Bug Fixes to C++ Support
506506^^^^^^^^^^^^^^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -8303,14 +8303,15 @@ void Sema::redelayDiagnostics(DelayedDiagnosticPool &pool) {
83038303}
83048304
83058305void Sema::ActOnCleanupAttr (Decl *D, const Attr *A) {
8306+ VarDecl *VD = cast<VarDecl>(D);
8307+ if (VD->getType ()->isDependentType ())
8308+ return ;
8309+
83068310 // Obtains the FunctionDecl that was found when handling the attribute
83078311 // earlier.
83088312 CleanupAttr *Attr = D->getAttr <CleanupAttr>();
83098313 FunctionDecl *FD = Attr->getFunctionDecl ();
83108314 DeclarationNameInfo NI = FD->getNameInfo ();
8311- VarDecl *VD = cast<VarDecl>(D);
8312- if (VD->getType ()->isDependentType ())
8313- return ;
83148315
83158316 // We're currently more strict than GCC about what function types we accept.
83168317 // If this ever proves to be a problem it should be easy to fix.
You can’t perform that action at this time.
0 commit comments