================
@@ -14367,6 +14386,17 @@ Sema::findInheritingConstructor(SourceLocation Loc,
DerivedCtor->setParams(ParamDecls);
Derived->addDecl(DerivedCtor);
+ // Propagate the class-level DLLExport attribute to the new inherited
+ // constructor so it gets exported. DLLImport is not propagated because the
+ // inherited ctor is an inline definition synthesized by the compiler.
+ if (Derived->hasAttr<DLLExportAttr>() &&
+ !DerivedCtor->hasAttr<DLLExportAttr>()) {
+ auto *NewAttr = ::new (getASTContext())
+ DLLExportAttr(getASTContext(), *Derived->getAttr<DLLExportAttr>());
----------------
ojhunt wrote:
This should be constructed via DLLExport::CreateImplicit
https://github.com/llvm/llvm-project/pull/182706
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits