@@ -1986,8 +1986,8 @@ namespace {
19861986 if (!decl->getDefinition ()) {
19871987 Impl.addImportDiagnostic (
19881988 decl,
1989- Diagnostic (diag::incomplete_record,
1990- Impl. SwiftContext . AllocateCopy ( decl->getNameAsString ())));
1989+ Diagnostic (diag::incomplete_record, Impl. SwiftContext . AllocateCopy (
1990+ decl->getNameAsString ())));
19911991 }
19921992
19931993 // FIXME: Figure out how to deal with incomplete types, since that
@@ -2001,18 +2001,18 @@ namespace {
20012001 // TODO(SR-13809): fix this once we support dependent types.
20022002 if (decl->getTypeForDecl ()->isDependentType ()) {
20032003 Impl.addImportDiagnostic (
2004- decl,
2005- Diagnostic ( diag::record_is_dependent,
2006- Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
2004+ decl, Diagnostic (
2005+ diag::record_is_dependent,
2006+ Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
20072007 return nullptr ;
20082008 }
20092009
20102010 // Don't import nominal types that are over-aligned.
20112011 if (Impl.isOverAligned (decl)) {
20122012 Impl.addImportDiagnostic (
2013- decl,
2014- Diagnostic ( diag::record_over_aligned,
2015- Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
2013+ decl, Diagnostic (
2014+ diag::record_over_aligned,
2015+ Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
20162016 return nullptr ;
20172017 }
20182018
@@ -2031,9 +2031,9 @@ namespace {
20312031 // referencing the name, which would sidestep our availability
20322032 // diagnostics.
20332033 Impl.addImportDiagnostic (
2034- decl,
2035- Diagnostic ( diag::record_non_trivial_copy_destroy,
2036- Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
2034+ decl, Diagnostic (
2035+ diag::record_non_trivial_copy_destroy,
2036+ Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
20372037 return nullptr ;
20382038 }
20392039
@@ -2054,9 +2054,9 @@ namespace {
20542054 Impl.importDeclContextOf (decl, importedName.getEffectiveContext ());
20552055 if (!dc) {
20562056 Impl.addImportDiagnostic (
2057- decl,
2058- Diagnostic ( diag::record_parent_unimportable,
2059- Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
2057+ decl, Diagnostic (
2058+ diag::record_parent_unimportable,
2059+ Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
20602060 return nullptr ;
20612061 }
20622062
@@ -2431,8 +2431,10 @@ namespace {
24312431 return VisitRecordDecl (decl);
24322432
24332433 if (!decl->getDefinition ()) {
2434- Impl.addImportDiagnostic (decl, Diagnostic (diag::incomplete_record,
2435- Impl.SwiftContext .AllocateCopy (decl->getNameAsString ())));
2434+ Impl.addImportDiagnostic (
2435+ decl,
2436+ Diagnostic (diag::incomplete_record, Impl.SwiftContext .AllocateCopy (
2437+ decl->getNameAsString ())));
24362438 }
24372439
24382440 decl = decl->getDefinition ();
@@ -2485,22 +2487,24 @@ namespace {
24852487
24862488 // It is import that we bail on an unimportable record *before* we import
24872489 // any of its members or cache the decl.
2488- auto semanticsKind = evaluateOrDefault (
2489- Impl.SwiftContext .evaluator ,
2490- CxxRecordSemantics ({decl, Impl.SwiftContext }), {});
2490+ auto semanticsKind =
2491+ evaluateOrDefault ( Impl.SwiftContext .evaluator ,
2492+ CxxRecordSemantics ({decl, Impl.SwiftContext }), {});
24912493 if (semanticsKind == CxxRecordSemanticsKind::MissingLifetimeOperation) {
24922494 Impl.addImportDiagnostic (
24932495 decl,
24942496 Diagnostic (diag::record_not_automatically_importable,
24952497 Impl.SwiftContext .AllocateCopy (decl->getNameAsString ()),
24962498 " does not have a copy constructor or destructor" ));
24972499 return nullptr ;
2498- } else if (semanticsKind == CxxRecordSemanticsKind::UnsafeLifetimeOperation) {
2500+ } else if (semanticsKind ==
2501+ CxxRecordSemanticsKind::UnsafeLifetimeOperation) {
24992502 Impl.addImportDiagnostic (
25002503 decl,
25012504 Diagnostic (diag::record_not_automatically_importable,
25022505 Impl.SwiftContext .AllocateCopy (decl->getNameAsString ()),
2503- " has custom, potentially unsafe copy constructor or destructor" ));
2506+ " has custom, potentially unsafe copy constructor or "
2507+ " destructor" ));
25042508 return nullptr ;
25052509 }
25062510
@@ -2767,7 +2771,8 @@ namespace {
27672771 Impl.addImportDiagnostic (
27682772 decl,
27692773 Diagnostic (diag::reference_passed_by_value,
2770- Impl.SwiftContext .AllocateCopy (recordType->getDecl ()->getNameAsString ()),
2774+ Impl.SwiftContext .AllocateCopy (
2775+ recordType->getDecl ()->getNameAsString ()),
27712776 " a parameter" ));
27722777 return true ;
27732778 }
@@ -2781,10 +2786,10 @@ namespace {
27812786 if (auto recordType = dyn_cast<clang::RecordType>(
27822787 decl->getReturnType ().getCanonicalType ())) {
27832788 Impl.addImportDiagnostic (
2784- decl,
2785- Diagnostic (diag::reference_passed_by_value,
2786- Impl. SwiftContext . AllocateCopy ( recordType->getDecl ()->getNameAsString ()),
2787- " the return" ));
2789+ decl, Diagnostic (diag::reference_passed_by_value,
2790+ Impl. SwiftContext . AllocateCopy (
2791+ recordType->getDecl ()->getNameAsString ()),
2792+ " the return" ));
27882793 return recordHasReferenceSemantics (recordType->getDecl ());
27892794 }
27902795
0 commit comments