Skip to content

Commit 4b005c4

Browse files
Fix typos in comments
1 parent d6227dc commit 4b005c4

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

docs/CppInteroperabilityManifesto.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ provide the following guarantees:
307307

308308
- `inout` are backed by initialized memory on function entry and function exit
309309
(an implication of the copy-in/copy-out semantics). Destroying the object in
310-
`inout` requires using unsafe construts. Therefore, in safe Swift `inout`
310+
`inout` requires using unsafe constructs. Therefore, in safe Swift `inout`
311311
parameters are backed by initialized memory throughout function execution.
312312

313313
- `inout` parameters don't alias each other or any other values that program is
@@ -1033,7 +1033,7 @@ in all Swift code, but it is feasible for local variables of concrete types.
10331033
An example where it is not possible to maintain precise destruction semantics
10341034
for C++ classes is in a generic Swift function that is called with a C++ class
10351035
as a type parameter. In this case, we must be able to compile one definition of
1036-
a Swift function, which must work regradless of the nature of the type (be it a
1036+
a Swift function, which must work regardless of the nature of the type (be it a
10371037
Swift type or a C++ class). This limitation does not seem too bad, because RAII
10381038
types are not often passed as type parameters to templates in C++, which creates
10391039
a reason to believe it will not be common in Swift either.

docs/Diagnostics.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Educational notes should:
100100
- Explain a single language concept. This makes them easy to reuse across related diagnostics and helps keep them clear, concise, and easy to understand.
101101
- Be written in unabbreviated English. These are longer-form messages compared to the main diagnostic, so there's no need to omit needless words and punctuation.
102102
- Not generally exceed 3-4 paragraphs. Educational notes should be clear and easily digestible. Messages which are too long also have the potential to create UX issues on the command line.
103-
- Be accessible. Educational notes should be beginner friendly and avoid assuming unnecesary prior knowledge. The goal is not only to help users understand what a diagnostic is telling them, but also to turn errors and warnings into "teachable moments".
103+
- Be accessible. Educational notes should be beginner friendly and avoid assuming unnecessary prior knowledge. The goal is not only to help users understand what a diagnostic is telling them, but also to turn errors and warnings into "teachable moments".
104104
- Include references to relevant chapters of _The Swift Programming Language_.
105105
- Be written in Markdown, but avoid excessive markup which negatively impacts the terminal UX.
106106

docs/DifferentiableProgramming.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2542,7 +2542,7 @@ As defined above, the `@differentiable` function type attributes requires all
25422542
non-`@noDerivative` arguments and results to conform to the `@differentiable`
25432543
attribute. However, there is one exception: when the type of an argument or
25442544
result is a function type, e.g. `@differentiable (T) -> @differentiable (U) ->
2545-
V`. This is because we need to differentiate higher-order funtions.
2545+
V`. This is because we need to differentiate higher-order functions.
25462546

25472547
Mathematically, the differentiability of `@differentiable (T, U) -> V` is
25482548
similar to that of `@differentiable (T) -> @differentiable (U) -> V` in that

include/swift/AST/Decl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2637,7 +2637,7 @@ class TypeAliasDecl : public GenericTypeDecl {
26372637
UnboundGenericType *getUnboundGenericType() const;
26382638

26392639
/// Retrieve a sugared interface type containing the structure of the interface
2640-
/// type before any semantic validation has occured.
2640+
/// type before any semantic validation has occurred.
26412641
Type getStructuralType() const;
26422642

26432643
/// Whether the typealias forwards perfectly to its underlying type.

lib/IRGen/IRGenDebugInfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class IRGenDebugInfo {
7979
/// If we are not emitting CodeView, this does nothing since the ``llvm.trap``
8080
/// instructions should already have an artificial location of zero.
8181
/// In CodeView, since zero is not an artificial location, we emit the
82-
/// location of the unified trap block at the end of the fuction as an
82+
/// location of the unified trap block at the end of the function as an
8383
/// artificial inline location pointing to the user's instruction.
8484
void setInlinedTrapLocation(IRBuilder &Builder, const SILDebugScope *Scope);
8585

stdlib/include/llvm/Support/MathExtras.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ extern const float huge_valf;
881881

882882

883883
/// Add two signed integers, computing the two's complement truncated result,
884-
/// returning true if overflow occured.
884+
/// returning true if overflow occurred.
885885
template <typename T>
886886
std::enable_if_t<std::is_signed<T>::value, T> AddOverflow(T X, T Y, T &Result) {
887887
#if __has_builtin(__builtin_add_overflow)

test/SILOptimizer/funcsig_explode_heuristic.sil

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ sil @guaranteed_user : $@convention(thin) (@guaranteed Klass) -> ()
4040
///////////
4141

4242
// We should never optimize this. If we did this would become a thunk, so we
43-
// know that just be checking NFC we have proven no optimization has occured.
43+
// know that just be checking NFC we have proven no optimization has occurred.
4444
//
4545
// CHECK-LABEL: sil @never_explode_trivial : $@convention(thin) (BigTrivial) -> () {
4646
// CHECK: } // end sil function 'never_explode_trivial'

0 commit comments

Comments
 (0)