mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[cxx-interop] Update fix-its to use new macro naming.
This commit is contained in:
@@ -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 ");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user