[cxx-interop] Update fix-its to use new macro naming.

This commit is contained in:
zoecarver
2023-03-16 11:09:31 -07:00
parent ba8e00d7f2
commit 048e5c73f6
3 changed files with 15 additions and 15 deletions

View File

@@ -4036,7 +4036,7 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
.diagnose(methodSwiftLoc, diag::mark_safe_to_import,
name.getBaseIdentifier().str())
.fixItInsert(methodSwiftLoc,
" __attribute__((swift_attr(\"safe_to_import\"))) ");
" SAFE_TO_IMPORT ");
} else if (cxxMethod->getReturnType()->isReferenceType()) {
// Rewrite a call to .at(42) as a subscript.
if (name.getBaseIdentifier().is("at") &&
@@ -4067,7 +4067,7 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
.diagnose(methodSwiftLoc, diag::mark_safe_to_import,
name.getBaseIdentifier().str())
.fixItInsert(methodSwiftLoc,
" __attribute__((swift_attr(\"safe_to_import\"))) ");
" SAFE_TO_IMPORT ");
}
} else if (cxxMethod->getReturnType()->isRecordType()) {
if (auto cxxRecord = dyn_cast<clang::CXXRecordDecl>(
@@ -4089,11 +4089,11 @@ void MissingMemberFailure::diagnoseUnsafeCxxMethod(SourceLoc loc,
.diagnose(methodSwiftLoc, diag::mark_safe_to_import,
name.getBaseIdentifier().str())
.fixItInsert(methodSwiftLoc,
" __attribute__((swift_attr(\"safe_to_import\"))) ");
" SAFE_TO_IMPORT ");
ctx.Diags
.diagnose(baseSwiftLoc, diag::mark_self_contained, returnTypeStr)
.fixItInsert(baseSwiftLoc,
"__attribute__((swift_attr(\"self_contained\"))) ");
"SELF_CONTAINED ");
}
}
}