mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[gardening] Fix inconsistent spacing.
This commit is contained in:
@@ -809,7 +809,7 @@ Debug Information
|
||||
sil-scope ::= 'sil_scope' [0-9]+ '{'
|
||||
sil-loc
|
||||
'parent' scope-parent
|
||||
('inlined_at' sil-scope-ref )?
|
||||
('inlined_at' sil-scope-ref)?
|
||||
'}'
|
||||
scope-parent ::= sil-function-name ':' sil-type
|
||||
scope-parent ::= sil-scope-ref
|
||||
|
||||
@@ -1038,7 +1038,7 @@ Splitting
|
||||
func **split**\ <Seq: Sliceable, IsSeparator: Predicate
|
||||
where IsSeparator.Arguments == Seq.Element
|
||||
>(_ seq: Seq, isSeparator: IsSeparator, maxSplit: Int = Int.max(),
|
||||
allowEmptySlices: Bool = false ) -> [Seq]
|
||||
allowEmptySlices: Bool = false) -> [Seq]
|
||||
|
||||
Splitting
|
||||
~~~~~~~~~
|
||||
|
||||
@@ -179,7 +179,7 @@ Here's a version of cycle_length that works when state is a mutable
|
||||
value type::
|
||||
|
||||
func cycle_length<State>(
|
||||
_ s : State, mutate : ( [inout] State ) -> ()
|
||||
_ s : State, mutate : ([inout] State) -> ()
|
||||
) -> Int
|
||||
requires State : EqualityComparable
|
||||
{
|
||||
@@ -211,7 +211,7 @@ classes:
|
||||
}
|
||||
|
||||
func cycle_length<State>(
|
||||
_ s : State, mutate : ( [inout] State ) -> ()
|
||||
_ s : State, mutate : ([inout] State) -> ()
|
||||
) -> Int
|
||||
requires State : EqualityComparable, **Clonable**
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ SILArgument::SILArgument(SILBasicBlock *ParentBB, SILType Ty,
|
||||
!ParentBB->getParent()->isBare() &&
|
||||
ParentBB->getParent()->size() == 1
|
||||
? D != nullptr
|
||||
: true );
|
||||
: true);
|
||||
ParentBB->insertArgument(ParentBB->bbarg_end(), this);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ SILArgument::SILArgument(SILBasicBlock *ParentBB,
|
||||
!ParentBB->getParent()->isBare() &&
|
||||
ParentBB->getParent()->size() == 1
|
||||
? D != nullptr
|
||||
: true );
|
||||
: true);
|
||||
ParentBB->insertArgument(Pos, this);
|
||||
}
|
||||
|
||||
|
||||
@@ -427,7 +427,7 @@ class SILPrinter : public SILVisitor<SILPrinter> {
|
||||
public:
|
||||
SILPrinter(
|
||||
SILPrintContext &PrintCtx,
|
||||
llvm::DenseMap<CanType, Identifier> *AlternativeTypeNames = nullptr )
|
||||
llvm::DenseMap<CanType, Identifier> *AlternativeTypeNames = nullptr)
|
||||
: Ctx(PrintCtx),
|
||||
PrintState{{PrintCtx.OS()}, PrintOptions::printSIL()},
|
||||
LastBufferID(0) {
|
||||
|
||||
@@ -379,7 +379,7 @@ matchCallArguments(ArrayRef<CallArgParam> args,
|
||||
// Find all of the named, unfulfilled parameters.
|
||||
llvm::SmallVector<unsigned, 4> unfulfilledNamedParams;
|
||||
bool hasUnfulfilledUnnamedParams = false;
|
||||
for (paramIdx = 0; paramIdx != numParams; ++paramIdx ) {
|
||||
for (paramIdx = 0; paramIdx != numParams; ++paramIdx) {
|
||||
if (parameterBindings[paramIdx].empty()) {
|
||||
if (params[paramIdx].hasLabel())
|
||||
unfulfilledNamedParams.push_back(paramIdx);
|
||||
|
||||
@@ -491,7 +491,7 @@ extension String : Hashable {
|
||||
if core.hasContiguousStorage {
|
||||
let stackAllocated = _NSContiguousString(core)
|
||||
return hashOffset ^ stackAllocated._unsafeWithNotEscapedSelfPointer {
|
||||
return _stdlib_NSStringHashValuePointer($0, isASCII )
|
||||
return _stdlib_NSStringHashValuePointer($0, isASCII)
|
||||
}
|
||||
} else {
|
||||
let cocoaString = unsafeBitCast(
|
||||
|
||||
@@ -52,7 +52,7 @@ func test_swift_unavailable() {
|
||||
let x: NSSwiftUnavailableStruct? = nil // expected-error {{'NSSwiftUnavailableStruct' is unavailable in Swift}}
|
||||
}
|
||||
|
||||
func test_CFReleaseRetainAutorelease(_ x : CFTypeRef, color : CGColor ) {
|
||||
func test_CFReleaseRetainAutorelease(_ x: CFTypeRef, color: CGColor) {
|
||||
CFRelease(x) // expected-error {{'CFRelease' is unavailable: Core Foundation objects are automatically memory managed}}
|
||||
CGColorRelease(color) // expected-error {{'CGColorRelease' is unavailable: Core Foundation objects are automatically memory managed}}
|
||||
CFRetain(x) // expected-error {{'CFRetain' is unavailable: Core Foundation objects are automatically memory managed}}
|
||||
|
||||
@@ -19,6 +19,6 @@ struct S<T> {
|
||||
}
|
||||
|
||||
func test<T>(_ t : T) {
|
||||
let a = S(a: t )
|
||||
let a = S(a: t)
|
||||
a.foo()
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#define SOURCEKITD_VERSION SOURCEKITD_VERSION_ENCODE( \
|
||||
SOURCEKITD_VERSION_MAJOR, \
|
||||
SOURCEKITD_VERSION_MINOR )
|
||||
SOURCEKITD_VERSION_MINOR)
|
||||
|
||||
#define SOURCEKITD_VERSION_STRINGIZE_(major, minor) \
|
||||
#major"."#minor
|
||||
|
||||
Reference in New Issue
Block a user