Skip to content

Fix a few typos #58739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/AndroidBuild.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ git clone https://github.com/apple/swift-corelibs-xctest swift-corelibs-xctest
git clone https://github.com/compnerd/swift-build swift-build
```

## 1. Acquire the lastest toolchain and dependencies
## 1. Acquire the latest toolchain and dependencies

1. Download the toolchain, ICU, libxml2, and curl for android from
[Azure](https://dev.azure.com/compnerd/swift-build) into `S:\b\a\Library`.
Expand Down
6 changes: 3 additions & 3 deletions docs/CppInteroperability/CppInteroperabilityManifesto.md
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ accepts an address.

C++ has complex overload resolution rules, in part to support certain API design
patterns. Some API design patterns appeared as a consequence of overload
resolution rules. Therefore, in C++ an "API atom" is an an overload set, not an
resolution rules. Therefore, in C++ an "API atom" is an overload set, not an
individual function ([CppCon 2018: Titus Winters "Modern C++ Design (part 1 of
2)"](https://www.youtube.com/watch?v=xTdeZ4MxbKo)). The same is also the case in
Swift, so, fundamentally, there is no impedance mismatch here.
Expand Down Expand Up @@ -938,7 +938,7 @@ be handled in Swift.

While it is possible to [propagate C++ exceptions](#exceptions) thrown by normal
member functions to Swift code, special member functions are different as they
used used to implement value witnesses, which are called by the compiler
used to implement value witnesses, which are called by the compiler
implicitly. Therefore, either such exceptions have to be mapped to fatal errors
(as we do for other unhandled C++ exceptions), or calls to such special member
functions must be prevented statically.
Expand Down Expand Up @@ -2337,7 +2337,7 @@ different APIs across specializations of the same class. All instantiations of a
generic type in Swift have the API described in the generic declaration (with
type parameters substituted), plus applicable conditional extensions.

C++ templates support non-type template parameters, template template
C++ templates support non-type template parameters, template
parameters, and parameter packs (variadic generics), all of which are not
supported in Swift.

Expand Down
18 changes: 9 additions & 9 deletions docs/CppInteroperability/InteropOddities.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# C++ Interoperability Oddities

C++ APIs may have slightly different behavior than other C++ APIs. This is a general catch-all document where these
C++ APIs may have slightly different behavior than other C++ APIs. This is a general catch-all document where these
oddities are recorded along with a few other things that are good to know when using C++ interop.

**Parameters with reference types**

Parameters that have mutable reference types are bridged as inout. Parameters with immutable reference types (const ref)
are bridged as value types. ⚠️ This will change as soon as Swift has a way to represent immutable borrows. ⚠️
Parameters that have mutable reference types are bridged as inout. Parameters with immutable reference types (const ref)
are bridged as value types. ⚠️ This will change as soon as Swift has a way to represent immutable borrows. ⚠️

**Lifetimes**

Currently, lifetimes are extended to the end of the lexical scope if any unsafe pointers are used in that scope. TODO:
this should be updated to extend lifetimes whenever a C++ type is used in that scope. Currently, if there is no
unsafe pointer used in the scope, then normal Swift lifetime rules apply.
Currently, lifetimes are extended to the end of the lexical scope if any unsafe pointers are used in that scope. TODO:
this should be updated to extend lifetimes whenever a C++ type is used in that scope. Currently, if there is no
unsafe pointer used in the scope, then normal Swift lifetime rules apply.

**Borrowing Self**

For mutating methods, self is borrowed and the access to self lasts for the duration of the call. For non-mutating
methods, the access to self is currently instantanious. ⚠️ In the very near future we plan to borrow self in both cases.
For mutating methods, self is borrowed and the access to self lasts for the duration of the call. For non-mutating
methods, the access to self is currently instantaneous. ⚠️ In the very near future we plan to borrow self in both cases.
This will be a source breaking change from what native Swift methods do. ⚠️

_More to come soon :)_
_More to come soon :)_
4 changes: 2 additions & 2 deletions docs/SILMemoryAccess.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ scope:
end_access %access : $*S
```

Note that is is possible to have a nested access scope on the address
Note that it is possible to have a nested access scope on the address
of a struct field, which may show up as an access of
struct_element_addr after inlining. The rule is that access
projections cannot occur outside of the outermost access scope within
Expand Down Expand Up @@ -396,7 +396,7 @@ instructions may reference the same variable. To find all global uses,
the client must independently find all global variable references
within the function. Clients that need to know which SILValue base was
discovered during use-def traversal in all cases can make use of
`AccessStorageWithBase` or `AccessPathWithBase`.
`AccessStorageWithBase` or `AccessPathWithBase`.

### AccessPath

Expand Down