[clang] [llvm] [clang] Add support for emitting DW_AT_defaulted (PR #213188)
Alex Langford via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 3 09:57:51 PDT 2026
================
@@ -2504,6 +2504,19 @@ llvm::DISubprogram *CGDebugInfo::CreateCXXMemberFunction(
if (Method->getCanonicalDecl()->isDeleted())
SPFlags |= llvm::DISubprogram::SPFlagDeleted;
+ const bool isExplicitlyDefaultable =
+ isa<CXXDestructorDecl>(Method) ||
+ (isa<CXXConstructorDecl>(Method) &&
+ cast<CXXConstructorDecl>(Method)->isDefaultConstructor()) ||
+ Method->isCopyOrMoveConstructorOrAssignment();
----------------
bulbazord wrote:
Agreed, a helper would be better than what I have. It doesn't look like `Sema` is used at all from CGDebugInfo so I'm not sure about the layering, so I'll see if `ASTContext` makes sense. Thanks!
https://github.com/llvm/llvm-project/pull/213188
More information about the cfe-commits
mailing list