Skip to content

Commit be78603

Browse files
Merge pull request #2100 from practicalswift/gardening-20160408
[gardening] Fix typos. Remove double spaces. Remove tabs in C++ code.
2 parents 6d5120b + ea0ac3a commit be78603

File tree

20 files changed

+49
-49
lines changed

20 files changed

+49
-49
lines changed

lib/Basic/Platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ StringRef swift::getPlatformNameForTriple(const llvm::Triple &triple) {
9393

9494
if (triple.isOSFreeBSD())
9595
return "freebsd";
96-
96+
9797
if (triple.isOSWindows())
9898
return "windows";
9999

lib/ClangImporter/CFTypeInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
#include "llvm/ADT/PointerUnion.h"
2020

2121
namespace clang {
22-
class RecordDecl;
23-
class TypedefNameDecl;
22+
class RecordDecl;
23+
class TypedefNameDecl;
2424
}
2525

2626
namespace swift {

lib/IRGen/GenCast.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,7 +736,7 @@ void irgen::emitScalarCheckedCast(IRGenFunction &IGF,
736736
if (auto sourceOptObjectType =
737737
sourceType.getAnyOptionalObjectType(*IGF.IGM.SILMod, optKind)) {
738738

739-
// Translate the value from an enum represention to a possibly-null
739+
// Translate the value from an enum representation to a possibly-null
740740
// representation. Note that we assume that this projection is safe
741741
// for the particular case of an optional class-reference or metatype
742742
// value.
@@ -820,4 +820,4 @@ void irgen::emitScalarCheckedCast(IRGenFunction &IGF,
820820

821821
llvm::Value *result = emitClassDowncast(IGF, instance, targetType, mode);
822822
out.add(result);
823-
}
823+
}

lib/Option/SanitizerOptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ SanitizerKind swift::parseSanitizerArgValues(const llvm::opt::Arg *A,
7777
Triple.getTriple());
7878
}
7979
// Thread Sanitizer only works on OS X and the simulators. It's only supported
80-
// on 64 bit arcitectures.
80+
// on 64 bit architectures.
8181
if (kind == SanitizerKind::Thread &&
8282
(!(Triple.isMacOSX() || tripleIsAnySimulator(Triple)) ||
8383
!Triple.isArch64Bit())) {

lib/SIL/SILGlobalVariable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ SILGlobalVariable::SILGlobalVariable(SILModule &Module, SILLinkage Linkage,
4848
Location(Loc),
4949
Linkage(unsigned(Linkage)),
5050
Fragile(IsFragile),
51-
VDecl(Decl) {
51+
VDecl(Decl) {
5252
IsDeclaration = isAvailableExternally(Linkage);
5353
setLet(Decl ? Decl->isLet() : false);
5454
InitializerF = nullptr;

stdlib/public/core/Arrays.swift.gyb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ extension ${Self} : RangeReplaceableCollection, _ArrayProtocol {
541541
_buffer = ${Self}._allocateBufferUninitialized(minimumCapacity: count)
542542
_buffer.count = count
543543
}
544-
// Cant store count here because the buffer might be pointing to the
544+
// Can't store count here because the buffer might be pointing to the
545545
// shared empty array.
546546
}
547547

stdlib/public/stubs/Stubs.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,13 @@ __muloti4(ti_int a, ti_int b, int* overflow)
276276
if (a == MIN)
277277
{
278278
if (b != 0 && b != 1)
279-
*overflow = 1;
280-
return result;
279+
*overflow = 1;
280+
return result;
281281
}
282282
if (b == MIN)
283283
{
284284
if (a != 0 && a != 1)
285-
*overflow = 1;
285+
*overflow = 1;
286286
return result;
287287
}
288288
ti_int sa = a >> (N - 1);

test/1_stdlib/Inputs/DictionaryKeyValueTypesObjC.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Foundation
55

66
// FIXME: Should go into the standard library.
77
public extension _ObjectiveCBridgeable {
8-
static func _unconditionallyBridgeFromObjectiveC(_ source: _ObjectiveCType?)
8+
static func _unconditionallyBridgeFromObjectiveC(_ source: _ObjectiveCType?)
99
-> Self {
1010
var result: Self? = nil
1111
_forceBridgeFromObjectiveC(source!, result: &result)
@@ -101,7 +101,7 @@ class TestObjCKeyTy : NSObject, NSCopying {
101101
return value.description
102102
}
103103

104-
override func isEqual(_ object: AnyObject!) -> Bool {
104+
override func isEqual(_ object: AnyObject!) -> Bool {
105105
if let other = object {
106106
if let otherObjcKey = other as? TestObjCKeyTy {
107107
return self.value == otherObjcKey.value
@@ -182,7 +182,7 @@ class TestObjCEquatableValueTy : NSObject {
182182
serial = -serial
183183
}
184184

185-
override func isEqual(_ object: AnyObject!) -> Bool {
185+
override func isEqual(_ object: AnyObject!) -> Bool {
186186
if let other = object {
187187
if let otherObjcKey = other as? TestObjCEquatableValueTy {
188188
return self.value == otherObjcKey.value
@@ -242,15 +242,15 @@ struct TestBridgedKeyTy
242242
return TestObjCKeyTy(value)
243243
}
244244

245-
static func _forceBridgeFromObjectiveC(
245+
static func _forceBridgeFromObjectiveC(
246246
_ x: TestObjCKeyTy,
247247
result: inout TestBridgedKeyTy?
248248
) {
249249
_bridgedKeyBridgeOperations.fetchAndAdd(1)
250250
result = TestBridgedKeyTy(x.value)
251251
}
252252

253-
static func _conditionallyBridgeFromObjectiveC(
253+
static func _conditionallyBridgeFromObjectiveC(
254254
_ x: TestObjCKeyTy,
255255
result: inout TestBridgedKeyTy?
256256
) -> Bool {
@@ -303,15 +303,15 @@ struct TestBridgedValueTy : CustomStringConvertible, _ObjectiveCBridgeable {
303303
return TestObjCValueTy(value)
304304
}
305305

306-
static func _forceBridgeFromObjectiveC(
306+
static func _forceBridgeFromObjectiveC(
307307
_ x: TestObjCValueTy,
308308
result: inout TestBridgedValueTy?
309309
) {
310310
TestBridgedValueTy.bridgeOperations += 1
311311
result = TestBridgedValueTy(x.value)
312312
}
313313

314-
static func _conditionallyBridgeFromObjectiveC(
314+
static func _conditionallyBridgeFromObjectiveC(
315315
_ x: TestObjCValueTy,
316316
result: inout TestBridgedValueTy?
317317
) -> Bool {
@@ -357,15 +357,15 @@ struct TestBridgedEquatableValueTy
357357
return TestObjCEquatableValueTy(value)
358358
}
359359

360-
static func _forceBridgeFromObjectiveC(
360+
static func _forceBridgeFromObjectiveC(
361361
_ x: TestObjCEquatableValueTy,
362362
result: inout TestBridgedEquatableValueTy?
363363
) {
364364
_bridgedEquatableValueBridgeOperations.fetchAndAdd(1)
365365
result = TestBridgedEquatableValueTy(x.value)
366366
}
367367

368-
static func _conditionallyBridgeFromObjectiveC(
368+
static func _conditionallyBridgeFromObjectiveC(
369369
_ x: TestObjCEquatableValueTy,
370370
result: inout TestBridgedEquatableValueTy?
371371
) -> Bool {

test/ClangModules/Inputs/enum-error.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
@class NSString;
66
extern NSString *const TestErrorDomain;
77
typedef NS_ERROR_ENUM(int, TestError, TestErrorDomain) {
8-
TENone,
9-
TEOne,
10-
TETwo,
8+
TENone,
9+
TEOne,
10+
TETwo,
1111
};
1212

1313
TestError getErr();

test/IDE/Inputs/custom-modules/InferImportAsMember.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void IAMStruct1DoSomething(struct IAMMutableStruct1 iamStruct1);
9595

9696
typedef struct TDStruct TDStruct;
9797
struct TDStruct {
98-
double x;
98+
double x;
9999
};
100100
// FIXME: the below doesn't appear in the output
101101
const TDStruct TDStructCreateWithFloat(float Float);

test/IDE/Inputs/mock-sdk/Bar.framework/Headers/Bar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum BarForwardDeclaredEnum {
1313
#define BAR_MACRO_1 0
1414

1515
typedef struct {
16-
int count;
16+
int count;
1717
} SomeItemSet;
1818

1919
typedef SomeItemSet SomeEnvironment;

test/IRGen/Inputs/StaticInline.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#import <Foundation/Foundation.h>
22

33
static inline NSString *staticInlineFun() {
4-
return [[NSLocale currentLocale] localeIdentifier];
4+
return [[NSLocale currentLocale] localeIdentifier];
55
}

test/Inputs/clang-importer-sdk/usr/include/Foundation.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -397,19 +397,19 @@ typedef NS_ENUM(NSUInteger, NSPostingStyle) {
397397
};
398398

399399
typedef NS_ENUM(NSUInteger, NSXMLNodeKind) {
400-
NSXMLInvalidKind = 0,
401-
NSXMLDocumentKind,
402-
NSXMLElementKind,
403-
NSXMLAttributeKind,
404-
NSXMLNamespaceKind,
405-
NSXMLProcessingInstructionKind,
406-
NSXMLCommentKind,
407-
NSXMLTextKind,
408-
NSXMLDTDKind __attribute__((swift_name("DTDKind"))),
409-
NSXMLEntityDeclarationKind,
410-
NSXMLAttributeDeclarationKind,
411-
NSXMLElementDeclarationKind,
412-
NSXMLNotationDeclarationKind
400+
NSXMLInvalidKind = 0,
401+
NSXMLDocumentKind,
402+
NSXMLElementKind,
403+
NSXMLAttributeKind,
404+
NSXMLNamespaceKind,
405+
NSXMLProcessingInstructionKind,
406+
NSXMLCommentKind,
407+
NSXMLTextKind,
408+
NSXMLDTDKind __attribute__((swift_name("DTDKind"))),
409+
NSXMLEntityDeclarationKind,
410+
NSXMLAttributeDeclarationKind,
411+
NSXMLElementDeclarationKind,
412+
NSXMLNotationDeclarationKind
413413
};
414414

415415
// From CoreFoundation
@@ -566,7 +566,7 @@ typedef NS_OPTIONS(NSInteger, AlertBuzzes) {
566566
typedef NS_OPTIONS(NSUInteger, NSBitmapFormat) {
567567
NSAlphaFirstBitmapFormat = 1 << 0, // 0 means is alpha last (RGBA, CMYKA, etc.)
568568
NSAlphaNonpremultipliedBitmapFormat = 1 << 1, // 0 means is premultiplied
569-
NSFloatingPointSamplesBitmapFormat = 1 << 2, // 0 is integer
569+
NSFloatingPointSamplesBitmapFormat = 1 << 2, // 0 is integer
570570

571571
NS16BitLittleEndianBitmapFormat /*NS_ENUM_AVAILABLE_MAC(10_51)*/ = (1 << 8),
572572
NS32BitLittleEndianBitmapFormat /*NS_ENUM_AVAILABLE_MAC(10_51)*/ = (1 << 9),
@@ -582,7 +582,7 @@ typedef NS_OPTIONS(NSUInteger, NSBitmapFormatReversed) {
582582

583583
NSAlphaFirstBitmapFormatR = 1 << 0, // 0 means is alpha last (RGBA, CMYKA, etc.)
584584
NSAlphaNonpremultipliedBitmapFormatR = 1 << 1, // 0 means is premultiplied
585-
NSFloatingPointSamplesBitmapFormatR = 1 << 2, // 0 is integer
585+
NSFloatingPointSamplesBitmapFormatR = 1 << 2, // 0 is integer
586586
};
587587

588588
typedef NS_OPTIONS(NSUInteger, NSBitmapFormat2) {

test/Inputs/clang-importer-sdk/usr/include/user_objc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ typedef CF_OPTIONS(UInt32, AudioComponentInstantiationOptions) {
3535
typedef CF_OPTIONS(UInt32, AudioComponentFlags) {
3636
kAudioComponentFlag_Unsearchable = 1,
3737
kAudioComponentFlag_SandboxSafe = 2,
38-
kAudioComponentFlag_IsV3AudioUnit = 4
38+
kAudioComponentFlag_IsV3AudioUnit = 4
3939
};
4040

4141
// ...and this one has both complications.

test/SIL/Parser/nonatomic_reference_counting.sil

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-swift-frontend %s -emit-silgen | FileCheck %s
22

3-
// Check that all refernce counting instructions can take the [nonatomic]
3+
// Check that all reference counting instructions can take the [nonatomic]
44
// attribute. SIL parser should be able to parse this attribute and
55
// SIL printer should properly print it.
66

test/SourceKit/Inputs/libIDE-mock-sdk/Bar.framework/Headers/Bar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum BarForwardDeclaredEnum {
1313
#define BAR_MACRO_1 0
1414

1515
typedef struct {
16-
int count;
16+
int count;
1717
} SomeItemSet;
1818

1919
typedef SomeItemSet SomeEnvironment;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

22
typedef struct {
3-
long width;
4-
long height;
3+
long width;
4+
long height;
55
} NUPixelSize;

tools/SourceKit/lib/SwiftLang/SwiftInterfaceGenContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace SourceKit {
3131
typedef IntrusiveRefCntPtr<ASTUnit> ASTUnitRef;
3232

3333
class SwiftInterfaceGenContext :
34-
public swift::ThreadSafeRefCountedBase<SwiftInterfaceGenContext> {
34+
public swift::ThreadSafeRefCountedBase<SwiftInterfaceGenContext> {
3535
public:
3636
static SwiftInterfaceGenContextRef create(StringRef DocumentName,
3737
bool IsModule,

tools/sil-opt/SILOpt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Passes(llvm::cl::desc("Passes:"),
9898
llvm::cl::values(
9999
#define PASS(ID, NAME, DESCRIPTION) clEnumValN(PassKind::ID, NAME, DESCRIPTION),
100100
#include "swift/SILOptimizer/PassManager/Passes.def"
101-
clEnumValEnd));
101+
clEnumValEnd));
102102

103103
static llvm::cl::opt<bool>
104104
PrintStats("print-stats", llvm::cl::desc("Print various statistics"));

utils/swift_build_support/tests/test_toolchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def test_clang_available_on_this_platform(self):
3131

3232
class HostToolchainTestCase(unittest.TestCase):
3333
def test_found_executables_match(self):
34-
# Test that the raw incovation of _first_common_executables
34+
# Test that the raw invocation of _first_common_executables
3535
# either returns None or matching paths.
3636
suffixes = ['', '-3.8', '-3.7', '-3.6']
3737
toolchain = host_toolchain(suffixes=suffixes)

0 commit comments

Comments
 (0)