@@ -173,14 +173,9 @@ bool importer::recordHasReferenceSemantics(
173
173
// return MissingLifetimeOperation if the type is not a foreign reference
174
174
// type. Note that this doesn't affect the correctness of this function, since
175
175
// those implicit members aren't required for foreign reference types.
176
-
177
- // To avoid emitting spurious diagnostics, let's disable them here. Types with
178
- // missing lifetime operations would get diagnosed later, once their members
179
- // are fully instantiated.
180
176
auto semanticsKind = evaluateOrDefault(
181
177
importerImpl->SwiftContext.evaluator,
182
- CxxRecordSemantics({decl, importerImpl->SwiftContext, importerImpl,
183
- /* shouldDiagnoseLifetimeOperations */ false}),
178
+ CxxRecordSemantics({decl, importerImpl->SwiftContext, importerImpl}),
184
179
{});
185
180
return semanticsKind == CxxRecordSemanticsKind::Reference;
186
181
}
@@ -2978,6 +2973,17 @@ namespace {
2978
2973
// members once they're instantiated.
2979
2974
!Impl.importSymbolicCXXDecls) {
2980
2975
2976
+ HeaderLoc loc(decl->getLocation());
2977
+ if (hasUnsafeAPIAttr(decl))
2978
+ Impl.diagnose(loc, diag::api_pattern_attr_ignored, "import_unsafe",
2979
+ decl->getNameAsString());
2980
+ if (hasOwnedValueAttr(decl))
2981
+ Impl.diagnose(loc, diag::api_pattern_attr_ignored, "import_owned",
2982
+ decl->getNameAsString());
2983
+ if (hasIteratorAPIAttr(decl))
2984
+ Impl.diagnose(loc, diag::api_pattern_attr_ignored, "import_iterator",
2985
+ decl->getNameAsString());
2986
+
2981
2987
if (semanticsKind == CxxRecordSemanticsKind::UnavailableConstructors) {
2982
2988
Impl.addImportDiagnostic(
2983
2989
decl, Diagnostic(diag::record_unsupported_default_args),
0 commit comments