Skip to content

Commit 9d5d624

Browse files
committed
[cxx-interop] Let through decls (mainly class templates) that do not have required lifetime operations when printing a module interface.
1 parent 1e43ba0 commit 9d5d624

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/ClangImporter/ImportDecl.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2659,7 +2659,10 @@ namespace {
26592659
auto semanticsKind =
26602660
evaluateOrDefault(Impl.SwiftContext.evaluator,
26612661
CxxRecordSemantics({decl, Impl.SwiftContext}), {});
2662-
if (semanticsKind == CxxRecordSemanticsKind::MissingLifetimeOperation) {
2662+
if (semanticsKind == CxxRecordSemanticsKind::MissingLifetimeOperation &&
2663+
// Let un-specialized class templates through. We'll sort out their
2664+
// members once they're instranciated.
2665+
!Impl.importSymbolicCXXDecls) {
26632666
Impl.addImportDiagnostic(
26642667
decl,
26652668
Diagnostic(diag::record_not_automatically_importable,

0 commit comments

Comments
 (0)