@@ -2038,10 +2038,8 @@ namespace {
2038
2038
if (Impl.SwiftContext .LangOpts .hasFeature (Feature::LifetimeDependence)) {
2039
2039
fd->getAttrs ().add (new (Impl.SwiftContext )
2040
2040
UnsafeNonEscapableResultAttr (/* Implicit=*/ true ));
2041
- if (Impl.SwiftContext .LangOpts .hasFeature (
2042
- Feature::StrictMemorySafety))
2043
- fd->getAttrs ().add (new (Impl.SwiftContext )
2044
- UnsafeAttr (/* Implicit=*/ true ));
2041
+ fd->getAttrs ().add (new (Impl.SwiftContext )
2042
+ UnsafeAttr (/* Implicit=*/ true ));
2045
2043
}
2046
2044
}
2047
2045
@@ -4178,19 +4176,19 @@ namespace {
4178
4176
LifetimeDependenceInfoRequest{result},
4179
4177
Impl.SwiftContext .AllocateCopy (lifetimeDependencies));
4180
4178
}
4181
- if (ASTContext.LangOpts .hasFeature (Feature::StrictMemorySafety)) {
4182
- for (auto [idx, param] : llvm::enumerate (decl->parameters ())) {
4183
- if (swiftParams->get (idx)->getInterfaceType ()->isEscapable ())
4184
- continue ;
4185
- if (param->hasAttr <clang::NoEscapeAttr>() || paramHasAnnotation[idx])
4186
- continue ;
4187
- // We have a nonescapable parameter that does not have its lifetime
4188
- // annotated nor is it marked noescape.
4189
- auto attr = new (ASTContext) UnsafeAttr (/* implicit=*/ true );
4190
- result->getAttrs ().add (attr);
4191
- break ;
4192
- }
4179
+
4180
+ for (auto [idx, param] : llvm::enumerate (decl->parameters ())) {
4181
+ if (swiftParams->get (idx)->getInterfaceType ()->isEscapable ())
4182
+ continue ;
4183
+ if (param->hasAttr <clang::NoEscapeAttr>() || paramHasAnnotation[idx])
4184
+ continue ;
4185
+ // We have a nonescapable parameter that does not have its lifetime
4186
+ // annotated nor is it marked noescape.
4187
+ auto attr = new (ASTContext) UnsafeAttr (/* implicit=*/ true );
4188
+ result->getAttrs ().add (attr);
4189
+ break ;
4193
4190
}
4191
+
4194
4192
Impl.diagnoseTargetDirectly (decl);
4195
4193
}
4196
4194
0 commit comments