[clang] [llvm] [Clang] Fix cleanup attribute by delaying type checks after the type is deduced (PR #164440)
Guillot Tony via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 24 03:00:14 PDT 2025
================
@@ -3354,6 +3354,21 @@ void Sema::mergeDeclAttributes(NamedDecl *New, Decl *Old,
if (!foundAny) New->dropAttrs();
}
+void Sema::CheckAttributesOnDeducedType(Expr *E, Decl *D) {
+ if (!D->hasAttrs())
+ return;
+
+ for (const Attr *A : D->getAttrs()) {
+ switch (A->getKind()) {
+ case attr::Cleanup:
+ ActOnCleanupAttr(E, D, A);
----------------
to268 wrote:
Done.
https://github.com/llvm/llvm-project/pull/164440
More information about the llvm-commits
mailing list