Skip to content

Commit 8062bfc

Browse files
committed
Format files
1 parent 679ce36 commit 8062bfc

11 files changed

+18
-25
lines changed

lib/Sema/ResilienceDiagnostics.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ TypeChecker::diagnoseDeclRefExportability(SourceLoc loc,
130130
if (originKind == DisallowedOriginKind::None)
131131
return false;
132132

133-
// TODO: different diagnostics
134133
ASTContext &ctx = definingModule->getASTContext();
135134

136135
auto fragileKind = where.getFragileFunctionKind();

lib/Sema/TypeCheckAccess.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1448,14 +1448,13 @@ class UsableFromInlineChecker : public AccessControlCheckerBase,
14481448
///
14491449
/// Local variant to swift::getDisallowedOriginKind for downgrade to warnings.
14501450
DisallowedOriginKind
1451-
swift::getDisallowedOriginKind(const Decl *decl, ExportContext where,
1451+
swift::getDisallowedOriginKind(const Decl *decl,
1452+
ExportContext where,
14521453
DowngradeToWarning &downgradeToWarning) {
14531454
downgradeToWarning = DowngradeToWarning::No;
14541455
ModuleDecl *M = decl->getModuleContext();
1455-
14561456
auto *SF = where.getDeclContext()->getParentSourceFile();
14571457
if (SF->isImportedImplementationOnly(M)) {
1458-
14591458
// Temporarily downgrade implementation-only exportability in SPI to
14601459
// a warning.
14611460
if (where.isSPI())
@@ -1494,9 +1493,9 @@ swift::getDisallowedOriginKind(const Decl *decl, ExportContext where,
14941493
return DisallowedOriginKind::ImplementationOnly;
14951494
} else if (decl->isSPI() && !where.isSPI()) {
14961495
// SPI can only be exported in SPI.
1497-
return where.getDeclContext()->getParentModule() == M
1498-
? DisallowedOriginKind::SPILocal
1499-
: DisallowedOriginKind::SPIImported;
1496+
return where.getDeclContext()->getParentModule() == M ?
1497+
DisallowedOriginKind::SPILocal :
1498+
DisallowedOriginKind::SPIImported;
15001499
}
15011500

15021501
return DisallowedOriginKind::None;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_A_H
22
#define TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_A_H
33

4-
inline int getFortySomething() {
5-
return 42;
6-
};
4+
inline int getFortySomething() { return 42; };
75

86
#endif // TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_A_H
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#ifndef TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_B_H
22
#define TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_B_H
33

4-
inline int getFortySomething() {
5-
return 46;
6-
};
4+
inline int getFortySomething() { return 46; };
75

86
#endif // TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_DECL_B_H
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
#ifndef TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_HELPER_H
22
#define TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_HELPER_H
33

4-
inline int getFortyTwo() {
5-
return 42;
6-
};
4+
inline int getFortyTwo() { return 42; };
75

86
class MagicWrapper {
9-
int _number;
7+
int _number;
8+
109
public:
11-
MagicWrapper(){};
12-
MagicWrapper(int number) : _number(number) {};
10+
MagicWrapper(){};
11+
MagicWrapper(int number) : _number(number){};
1312
};
1413

1514
#endif // TEST_INTEROP_CXX_IMPLEMENTATION_ONLY_IMPORTS_INPUTS_HELPER_H

test/Interop/Cxx/implementation-only-imports/check-constructor-visibility.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ import UserB
88

99
@_inlineable
1010
public func createAWrapper() {
11-
let _wrapper = MagicWrapper();
11+
let _wrapper = MagicWrapper()
1212
}

test/Interop/Cxx/implementation-only-imports/check-decls-are-identical.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import DeclB
66

77
@_inlineable
88
public func callFortySomething() -> CInt {
9-
return getFortySomething()
9+
return getFortySomething()
1010
}
1111

1212
// CHECK: 'getFortySomething' has different definitions in different modules

test/Interop/Cxx/implementation-only-imports/lookup-visible-decls-recursively-inversed.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import UseModuleB
2222

2323
@inlinable
2424
public func callFortyTwo() -> CInt {
25-
return getFortyTwo()
25+
return getFortyTwo()
2626
}

test/Interop/Cxx/implementation-only-imports/lookup-visible-decls-recursively.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ import UseModuleA
2222

2323
@inlinable
2424
public func callFortyTwo() -> CInt {
25-
return getFortyTwo()
25+
return getFortyTwo()
2626
}

test/Interop/Cxx/implementation-only-imports/prefer-a-visible-decl-over-implementation-only-decls-inversed.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ import UserA
1818

1919
@_inlineable
2020
public func callFortyTwo() -> CInt {
21-
return getFortyTwo()
21+
return getFortyTwo()
2222
}

0 commit comments

Comments
 (0)