Skip to content

Commit db0b5db

Browse files
authored
[test/Interop] Fix typos (#75032)
1 parent 2cd4b69 commit db0b5db

12 files changed

+25
-25
lines changed

test/Interop/Cxx/class/constructors-silgen.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public func testConstructorWithParam() {
2323
// CHECK: apply [[FN]]([[AS]]) : $@convention(c) () -> @out EmptyStruct
2424
// CHECK-LABEL: end sil function '$s4main18emptyTypeNoArgInityyF'
2525

26-
// CHECL-LABEL: sil [clang EmptyStruct.init] @{{_ZN11EmptyStructC1Ev|\?\?0EmptyStruct@@QEAA@XZ}} : $@convention(c) () -> @out EmptyStruct
26+
// CHECK-LABEL: sil [clang EmptyStruct.init] @{{_ZN11EmptyStructC1Ev|\?\?0EmptyStruct@@QEAA@XZ}} : $@convention(c) () -> @out EmptyStruct
2727
public func emptyTypeNoArgInit() {
2828
let e = EmptyStruct()
2929
}

test/Interop/Cxx/class/invalid-unsafe-projection-errors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ module Test {
1010

1111
//--- Inputs/test.h
1212
struct Ptr { int *p; };
13-
struct __attribute__((swift_attr("import_owned"))) StirngLiteral { const char *name; };
13+
struct __attribute__((swift_attr("import_owned"))) StringLiteral { const char *name; };
1414

1515
struct M {
1616
M(const M&);
@@ -20,7 +20,7 @@ struct M {
2020

2121
int *begin() const;
2222

23-
StirngLiteral stringLiteral() const { return StirngLiteral{"M"}; }
23+
StringLiteral stringLiteral() const { return StringLiteral{"M"}; }
2424
};
2525

2626
//--- test.swift

test/Interop/Cxx/extern-c/Inputs/inline-func.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ extern "C" {
22

33
inline void inlineFn();
44

5-
void cacheMis() { }
5+
void cacheMiss() { }
66
void incorrectCacheHit() {
77
inlineFn();
88
}
99

1010
static void caller() {
11-
cacheMis();
11+
cacheMiss();
1212
incorrectCacheHit();
1313
}
1414

test/Interop/Cxx/foreign-reference/invalid-retain-operation-errors.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ module Test {
1111
//--- Inputs/test.h
1212
struct
1313
__attribute__((swift_attr("import_reference")))
14-
__attribute__((swift_attr("retain:nonexistant")))
15-
__attribute__((swift_attr("release:nonexistant")))
16-
NonExistant {};
14+
__attribute__((swift_attr("retain:nonexistent")))
15+
__attribute__((swift_attr("release:nonexistent")))
16+
NonExistent {};
1717

1818
struct
1919
__attribute__((swift_attr("import_reference")))
@@ -32,9 +32,9 @@ void badRelease(BadRetainRelease *v, int i);
3232

3333
import Test
3434

35-
// CHECK: error: cannot find retain function 'nonexistant' for reference type 'NonExistant'
36-
// CHECK: error: cannot find release function 'nonexistant' for reference type 'NonExistant'
37-
public func test(x: NonExistant) { }
35+
// CHECK: error: cannot find retain function 'nonexistent' for reference type 'NonExistent'
36+
// CHECK: error: cannot find release function 'nonexistent' for reference type 'NonExistent'
37+
public func test(x: NonExistent) { }
3838

3939
// CHECK: error: reference type 'NoRetainRelease' must have 'retain:' swift attribute
4040
// CHECK: error: reference type 'NoRetainRelease' must have 'release:' swift attribute

test/Interop/Cxx/reference/reference-silgen-cxx-objc-ctors+init.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var a: Int32 = 32
77
var b = IntWrapper(a)
88
var c = ObjCSwiftBridge(embedded: b)
99

10-
// FIXME: the const-ref C++ Consructor here is not getting an @in_guaranteed or even an @in convention here.
10+
// FIXME: the const-ref C++ Constructor here is not getting an @in_guaranteed or even an @in convention here.
1111
// CHECK: {{%[0-9]+}} = function_ref @_ZN10IntWrapperC1ERKi : $@convention(c) (@in_guaranteed Int32) -> @out IntWrapper
1212
// CHECK: {{%[0-9]+}} = apply {{%[0-9]+}}({{%[0-9]+}}, {{%[0-9]+}}) : $@convention(c) (@in_guaranteed Int32) -> @out IntWrapper
1313
// CHECK: alloc_global @$s4main1cSo15ObjCSwiftBridgeCSgvp

test/Interop/Cxx/templates/Inputs/class-template-with-typedef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ struct Lander<void> {};
1111
template <class T> struct Lander {
1212
typedef unsigned long size_type;
1313
// Make sure we don't crash here. Before being specialized, "size_type" is
14-
// technically a depedent type because it expands to "Lander<T>::size_type".
14+
// technically a dependent type because it expands to "Lander<T>::size_type".
1515
void test(size_type) { }
1616
};
1717

test/Interop/Cxx/templates/Inputs/function-templates.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ template <class T> void takesDependent(Dependent<T> d) {}
106106

107107
void takesAtomic(_Atomic(int) a) {}
108108

109-
struct HasImposibleMember {
109+
struct HasImpossibleMember {
110110
void memberTakesAtomic(_Atomic(int) a) {}
111111
};
112112

test/Interop/SwiftToC/functions/swift-primitive-functions-c-bridging.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
// RUN: %check-interop-c-header-in-clang(%t/functions.h)
66

7-
// CHECK: SWIFT_EXTERN float $s9Functions16passThrougCFloatyS2fF(float x) SWIFT_NOEXCEPT SWIFT_CALL;
8-
// CHECK-NEXT: SWIFT_EXTERN bool $s9Functions15passThroughBoolyS2bF(bool x) SWIFT_NOEXCEPT SWIFT_CALL;
7+
// CHECK: SWIFT_EXTERN bool $s9Functions15passThroughBoolyS2bF(bool x) SWIFT_NOEXCEPT SWIFT_CALL;
98
// CHECK-NEXT: SWIFT_EXTERN bool $s9Functions16passThroughCBoolyS2bF(bool x) SWIFT_NOEXCEPT SWIFT_CALL;
109
// CHECK-NEXT: SWIFT_EXTERN char $s9Functions16passThroughCCharys4Int8VADF(char x) SWIFT_NOEXCEPT SWIFT_CALL;
1110
// CHECK-NEXT: SWIFT_EXTERN char16_t $s9Functions18passThroughCChar16ys6UInt16VADF(char16_t x) SWIFT_NOEXCEPT SWIFT_CALL;
1211
// CHECK-NEXT: SWIFT_EXTERN char32_t $s9Functions18passThroughCChar32ys7UnicodeO6ScalarVAFF(char32_t x) SWIFT_NOEXCEPT SWIFT_CALL;
1312
// CHECK-NEXT: SWIFT_EXTERN double $s9Functions18passThroughCDoubleyS2dF(double x) SWIFT_NOEXCEPT SWIFT_CALL;
13+
// CHECK-NEXT: SWIFT_EXTERN float $s9Functions17passThroughCFloatyS2fF(float x) SWIFT_NOEXCEPT SWIFT_CALL;
1414
// CHECK-NEXT: SWIFT_EXTERN int $s9Functions15passThroughCIntys5Int32VADF(int x) SWIFT_NOEXCEPT SWIFT_CALL;
1515
// CHECK-NEXT: SWIFT_EXTERN long long $s9Functions20passThroughCLongLongys5Int64VADF(long long x) SWIFT_NOEXCEPT SWIFT_CALL;
1616
// CHECK-NEXT: SWIFT_EXTERN short $s9Functions17passThroughCShortys5Int16VADF(short x) SWIFT_NOEXCEPT SWIFT_CALL;
@@ -63,7 +63,7 @@ public func passThroughCUnsignedShort(_ x: CUnsignedShort) -> CUnsignedShort { r
6363
public func passThroughCUnsignedInt(_ x: CUnsignedInt) -> CUnsignedInt { return x }
6464
public func passThroughCUnsignedLongLong(_ x: CUnsignedLongLong) -> CUnsignedLongLong { return x }
6565

66-
public func passThrougCFloat(_ x: CFloat) -> CFloat { return x }
66+
public func passThroughCFloat(_ x: CFloat) -> CFloat { return x }
6767
public func passThroughCDouble(_ x: CDouble) -> CDouble { return x }
6868

6969
public func passThroughInt8(_ x: Int8) -> Int8 { return x }

test/Interop/SwiftToC/functions/swift-primitive-functions-execution.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ int main() {
5151
VERIFY_PASSTHROUGH_VALUE($s9Functions024passThroughCUnsignedLongE0ys6UInt64VADF, 0xFFFFFFFF);
5252

5353
// passThrougCFloat
54-
VERIFY_PASSTHROUGH_VALUE($s9Functions16passThrougCFloatyS2fF, 1.0f);
54+
VERIFY_PASSTHROUGH_VALUE($s9Functions17passThroughCFloatyS2fF, 1.0f);
5555
// passThroughCDouble
5656
VERIFY_PASSTHROUGH_VALUE($s9Functions18passThroughCDoubleyS2dF, 42.125f);
5757

test/Interop/SwiftToCxx/functions/swift-primitive-functions-cxx-bridging.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
// RUN: %check-interop-cxx-header-in-clang(%t/functions.h -DSWIFT_CXX_INTEROP_HIDE_STL_OVERLAY)
66

7-
// CHECK: SWIFT_INLINE_THUNK float passThrougCFloat(float x) noexcept SWIFT_SYMBOL({{.*}}) SWIFT_WARN_UNUSED_RESULT {
8-
// CHECK-NEXT: return _impl::$s9Functions16passThrougCFloatyS2fF(x);
9-
// CHECK-NEXT: }
10-
117
// CHECK: SWIFT_INLINE_THUNK bool passThroughBool(bool x) noexcept SWIFT_SYMBOL({{.*}}) SWIFT_WARN_UNUSED_RESULT {
128
// CHECK-NEXT: return _impl::$s9Functions15passThroughBoolyS2bF(x);
139
// CHECK-NEXT: }
@@ -32,6 +28,10 @@
3228
// CHECK-NEXT: return _impl::$s9Functions18passThroughCDoubleyS2dF(x);
3329
// CHECK-NEXT: }
3430

31+
// CHECK: SWIFT_INLINE_THUNK float passThroughCFloat(float x) noexcept SWIFT_SYMBOL({{.*}}) SWIFT_WARN_UNUSED_RESULT {
32+
// CHECK-NEXT: return _impl::$s9Functions17passThroughCFloatyS2fF(x);
33+
// CHECK-NEXT: }
34+
3535
// CHECK: SWIFT_INLINE_THUNK int passThroughCInt(int x) noexcept SWIFT_SYMBOL({{.*}}) SWIFT_WARN_UNUSED_RESULT {
3636
// CHECK-NEXT: return _impl::$s9Functions15passThroughCIntys5Int32VADF(x);
3737
// CHECK-NEXT: }
@@ -179,7 +179,7 @@ public func passThroughCUnsignedShort(_ x: CUnsignedShort) -> CUnsignedShort { r
179179
public func passThroughCUnsignedInt(_ x: CUnsignedInt) -> CUnsignedInt { return x }
180180
public func passThroughCUnsignedLongLong(_ x: CUnsignedLongLong) -> CUnsignedLongLong { return x }
181181

182-
public func passThrougCFloat(_ x: CFloat) -> CFloat { return x }
182+
public func passThroughCFloat(_ x: CFloat) -> CFloat { return x }
183183
public func passThroughCDouble(_ x: CDouble) -> CDouble { return x }
184184

185185
public func passThroughInt8(_ x: Int8) -> Int8 { return x }

test/Interop/SwiftToCxx/functions/swift-primitive-functions-execution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ int main() {
3535
VERIFY_PASSTHROUGH_VALUE(passThroughCUnsignedInt, 0xFFFFFFFF);
3636
VERIFY_PASSTHROUGH_VALUE(passThroughCUnsignedLongLong, 0xFFFFFFFF);
3737

38-
VERIFY_PASSTHROUGH_VALUE(passThrougCFloat, 1.0f);
38+
VERIFY_PASSTHROUGH_VALUE(passThroughCFloat, 1.0f);
3939
VERIFY_PASSTHROUGH_VALUE(passThroughCDouble, 42.125f);
4040

4141
VERIFY_PASSTHROUGH_VALUE(passThroughInt8, -1);

test/Interop/SwiftToCxx/stdlib/stdlib-in-cxx-no-diagnostics-generated-header.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// RUN: split-file %s %t
33
// RUN: %target-swift-frontend -typecheck %t/print-string.swift -typecheck -module-name Stringer -enable-experimental-cxx-interop -emit-clang-header-path %t/Stringer.h
44

5-
// Ensure: we don't hit any spurios warnings instantiating
5+
// Ensure: we don't hit any spurious warnings instantiating
66
// C++ standard library templates because of the generated header.
77

88
// RUN: %target-interop-build-clangxx -std=gnu++20 -fsyntax-only -c %t/test-stdlib.cpp -I %t -Wall -Werror -Werror=ignored-attributes -Wno-error=unused-command-line-argument

0 commit comments

Comments
 (0)