Skip to content

Commit 626f94a

Browse files
Merge pull request #2043 from practicalswift/syntax-01
[gardening] "if (foo)[SPACE][SPACE]{" → "if (foo)[SPACE]{"
2 parents 06e84d1 + 798877a commit 626f94a

File tree

14 files changed

+15
-15
lines changed

14 files changed

+15
-15
lines changed

docs/proposals/InitializerInheritance.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ examples::
203203
class B3 : A {
204204
var counter: Int
205205

206-
init withInitialCount(initialCount: Int) { // subobject initializer
206+
init withInitialCount(initialCount: Int) { // subobject initializer
207207
counter = initialCount
208208
super.init(withTitle: "Unnamed")
209209
}

lib/AST/Type.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ CanType CanType::getAnyOptionalObjectTypeImpl(CanType type,
650650
return CanType();
651651
}
652652

653-
Type TypeBase::getAnyPointerElementType(PointerTypeKind &PTK) {
653+
Type TypeBase::getAnyPointerElementType(PointerTypeKind &PTK) {
654654
if (auto boundTy = getAs<BoundGenericType>()) {
655655
auto &C = getASTContext();
656656
if (boundTy->getDecl() == C.getUnsafeMutablePointerDecl()) {

lib/ClangImporter/SwiftLookupTable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ void SwiftLookupTable::deserializeAll() {
522522

523523
/// Print a stored context to the given output stream for debugging purposes.
524524
static void printStoredContext(SwiftLookupTable::StoredContext context,
525-
llvm::raw_ostream &out) {
525+
llvm::raw_ostream &out) {
526526
switch (context.first) {
527527
case SwiftLookupTable::ContextKind::TranslationUnit:
528528
out << "TU";

lib/IRGen/GenExistential.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class ExistentialTypeInfoBase : public Base,
157157
ExistentialTypeInfoBase(ArrayRef<ProtocolEntry> protocols,
158158
As &&...args)
159159
: Base(std::forward<As>(args)...),
160-
NumStoredProtocols(protocols.size()) {
160+
NumStoredProtocols(protocols.size()) {
161161
std::uninitialized_copy(protocols.begin(), protocols.end(),
162162
this->template getTrailingObjects<ProtocolEntry>());
163163
}

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5214,7 +5214,7 @@ ParserStatus Parser::parseDeclSubscript(ParseDeclOptions Flags,
52145214
// '{'
52155215
// Parse getter and setter.
52165216
ParsedAccessors accessors;
5217-
if (Tok.isNot(tok::l_brace)) {
5217+
if (Tok.isNot(tok::l_brace)) {
52185218
// Subscript declarations must always have at least a getter, so they need
52195219
// to be followed by a {.
52205220
if (Flags.contains(PD_InProtocol))

lib/Parse/ParseSIL.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3224,7 +3224,7 @@ bool SILParser::parseSILInstruction(SILBasicBlock *BB) {
32243224
if (intTy) {
32253225
// If it is a switch on an integer type, check that all case values
32263226
// are integer literals or undef.
3227-
if (!isa<SILUndef>(CaseVal)) {
3227+
if (!isa<SILUndef>(CaseVal)) {
32283228
auto *IL = dyn_cast<IntegerLiteralInst>(CaseVal);
32293229
if (!IL) {
32303230
P.diagnose(P.Tok, diag::sil_integer_literal_not_integer_type);

lib/SILOptimizer/Transforms/DeadStoreElimination.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ class DSEContext {
476476

477477
} // end anonymous namespace
478478

479-
void BlockState::init(DSEContext &Ctx, bool Optimistic) {
479+
void BlockState::init(DSEContext &Ctx, bool Optimistic) {
480480
std::vector<LSLocation> &LV = Ctx.getLocationVault();
481481
LocationNum = LV.size();
482482
// For function that requires just 1 iteration of the data flow to converge

lib/SILOptimizer/Transforms/Sink.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class CodeSinkingPass : public SILFunctionTransform {
7373

7474
// TODO: We may want to delete debug instructions to allow us to sink more
7575
// instructions.
76-
for (auto *Operand : II->getUses()) {
76+
for (auto *Operand : II->getUses()) {
7777
SILInstruction *User = Operand->getUser();
7878

7979
// Check if the instruction is already in the user's block.

lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ namespace {
189189
LTI.haveStringLiteral = true;
190190
auto tyvar = expr->getType()->getAs<TypeVariableType>();
191191

192-
if (tyvar) {
192+
if (tyvar) {
193193
LTI.stringLiteralTyvars.push_back(tyvar);
194194
}
195195

test/ClangModules/objc_init.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ class MyTableViewController : NSTableViewController {
9898
}
9999

100100
class MyOtherTableViewController : NSTableViewController {
101-
override init(int i: Int) {
101+
override init(int i: Int) {
102102
super.init(int: i)
103103
}
104104
} // expected-error{{'required' initializer 'init(coder:)' must be provided by subclass of 'NSTableViewController'}}
105105

106106
class MyThirdTableViewController : NSTableViewController {
107-
override init(int i: Int) {
107+
override init(int i: Int) {
108108
super.init(int: i)
109109
}
110110

test/Interpreter/mandelbrot.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func getMandelbrotIterations(c: Complex, _ maxIterations: Int) -> Int {
3333

3434
func mandelbrot(xMin: Double, _ xMax: Double,
3535
_ yMin: Double, _ yMax: Double,
36-
_ rows: Int, _ cols: Int) {
36+
_ rows: Int, _ cols: Int) {
3737
// Set the spacing for the points in the Mandelbrot set.
3838
var dX = (xMax - xMin) / Double(rows)
3939
var dY = (yMax - yMin) / Double(cols)

test/SILOptimizer/spec_recursion.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ x1.new_method(<, left: 0, right: 1)
1313

1414
struct Test<T> {
1515
init() {}
16-
func recursive(x x : T) {
16+
func recursive(x x : T) {
1717
return recursive(x: x)
1818
}
1919
}

test/attr/attr_objc.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ extension PlainClass {
16891689

16901690
// CHECK-LABEL: @objc(setWithRed:green:blue:alpha:) dynamic func set
16911691
@objc(setWithRed:green:blue:alpha:)
1692-
func set(_: Float, green: Float, blue: Float, alpha: Float) { }
1692+
func set(_: Float, green: Float, blue: Float, alpha: Float) { }
16931693

16941694
// CHECK-LABEL: @objc(createWithRed:green:blue:alpha:) dynamic class func createWith
16951695
@objc(createWithRed:green blue:alpha)

test/decl/ext/protocol_as_witness.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ struct X2 : P2 {
2424
}
2525

2626
extension P2 where Self : Comparable {
27-
func f() {}
27+
func f() {}
2828
}
2929

3030
// rdar://problem/19423637

0 commit comments

Comments
 (0)