mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add @safe(unchecked) to allow unsafe code within a declaration.
Introduce an attribute to allow unsafe code within the annotated declaration without presenting an unsafe interface to users. This is, by its nature, and unsafe construct, and is used to document where unsafe behavior is encapsulated in safe constructs. There is an optional message that can be used as part of an audit trail.
This commit is contained in:
@@ -2271,6 +2271,12 @@ namespace decls_block {
|
||||
BCArray<BCFixed<1>> // concatenated param indices
|
||||
>;
|
||||
|
||||
using SafeDeclAttrLayout = BCRecordLayout<
|
||||
Safe_DECL_ATTR,
|
||||
BCFixed<1>, // implicit flag
|
||||
BCBlob // message
|
||||
>;
|
||||
|
||||
using AbstractClosureExprLayout = BCRecordLayout<
|
||||
ABSTRACT_CLOSURE_EXPR_CONTEXT,
|
||||
TypeIDField, // type
|
||||
|
||||
Reference in New Issue
Block a user