Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/swift/Basic/JSONSerialization.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ struct missingTraits : public std::integral_constant<bool,
&& !has_ScalarBitSetTraits<T>::value
&& !has_ScalarTraits<T>::value
&& !has_ObjectTraits<T>::value
&& !has_ArrayTraits<T>::value> {};
&& !has_ArrayTraits<T>::value> {};

template<typename T>
struct validatedObjectTraits : public std::integral_constant<bool,
Expand Down
2 changes: 1 addition & 1 deletion include/swift/Driver/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace llvm {
}

template <typename Fn>
void swift::driver::types::forAllTypes(const Fn &fn) {
void swift::driver::types::forAllTypes(const Fn &fn) {
static_assert(std::is_constructible<std::function<void(types::ID)>,Fn>::value,
"must have the signature 'void(types::ID)'");
for (uint8_t i = 0; i < static_cast<uint8_t>(TY_INVALID); ++i)
Expand Down
2 changes: 1 addition & 1 deletion include/swift/SIL/PatternMatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ using BuiltinApplyTy = typename Apply_match<BuiltinValueKind, Tys...>::Ty;
/// Matcher for any of the builtin checked conversions.
template <typename T0>
inline typename OneOf_match<BuiltinApplyTy<T0>, BuiltinApplyTy<T0>>::Ty
m_CheckedConversion(const T0 &Op0) {
m_CheckedConversion(const T0 &Op0) {
return m_USCheckedConversion(Op0) || m_SUCheckedConversion(Op0);
}

Expand Down
2 changes: 1 addition & 1 deletion include/swift/SILAnalysis/BottomUpIPAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class BottomUpIPAnalysis : public SILAnalysis {
};

/// Computes and stores a bottom-up function order.
template<typename FunctionInfo> class BottomUpFunctionOrder {
template<typename FunctionInfo> class BottomUpFunctionOrder {

typedef llvm::SmallVector<FunctionInfo *, 8> FunctionInfoList;

Expand Down
4 changes: 2 additions & 2 deletions lib/AST/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class SourceFile::LookupCache {
Members.shrink_and_clear();
}

decltype(Members)::const_iterator begin() const { return Members.begin(); }
decltype(Members)::const_iterator begin() const { return Members.begin(); }
decltype(Members)::const_iterator end() const { return Members.end(); }
decltype(Members)::const_iterator find(DeclName Name) const {
return Members.find(Name);
Expand Down Expand Up @@ -1530,7 +1530,7 @@ bool SourceFile::walk(ASTWalker &walker) {
return false;
}

StringRef SourceFile::getFilename() const {
StringRef SourceFile::getFilename() const {
if (BufferID == -1)
return "";
SourceManager &SM = getASTContext().SourceMgr;
Expand Down
2 changes: 1 addition & 1 deletion lib/IDE/SyntaxModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ std::pair<bool, Stmt *> ModelASTWalker::walkToStmtPre(Stmt *S) {
TokLen = 7; // '#elseif'
if (!passNonTokenNode({SyntaxNodeKind::BuildConfigKeyword,
CharSourceRange(Clause.Loc, TokLen) }))
return { false, nullptr };
return { false, nullptr };

if (Clause.Cond && !annotateIfConfigConditionIdentifiers(Clause.Cond))
return { false, nullptr };
Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/CSRanking.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ ConstraintSystem::findBestSolution(SmallVectorImpl<Solution> &viable,
return None;
}

SolutionDiff::SolutionDiff(ArrayRef<Solution> solutions) {
SolutionDiff::SolutionDiff(ArrayRef<Solution> solutions) {
if (solutions.size() <= 1)
return;

Expand Down
2 changes: 1 addition & 1 deletion lib/Sema/TypeCheckAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class AttributeEarlyChecker : public AttributeVisitor<AttributeEarlyChecker> {
void visitTransparentAttr(TransparentAttr *attr);
void visitMutationAttr(DeclAttribute *attr);
void visitMutatingAttr(MutatingAttr *attr) { visitMutationAttr(attr); }
void visitNonMutatingAttr(NonMutatingAttr *attr) { visitMutationAttr(attr); }
void visitNonMutatingAttr(NonMutatingAttr *attr) { visitMutationAttr(attr); }
void visitDynamicAttr(DynamicAttr *attr);

void visitOwnershipAttr(OwnershipAttr *attr) {
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/ArrayBuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ extension _ArrayBuffer {
element is Element,
"Down-casted Array element failed to match the target type")
}
else {
else {
let ns = _nonNative
_precondition(
ns.objectAtIndex(index) is Element,
Expand Down
2 changes: 1 addition & 1 deletion stdlib/public/core/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ extension String : _BuiltinUTF16StringLiteralConvertible {
public init(
_builtinUTF16StringLiteral start: Builtin.RawPointer,
numberOfCodeUnits: Builtin.Word
) {
) {
self = String(
_StringCore(
baseAddress: COpaquePointer(start),
Expand Down
2 changes: 1 addition & 1 deletion test/1_stdlib/Mirror.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func find(substring: String, within domain: String) -> String.Index? {
if (domainCount < substringCount) { return nil }
var sliceStart = domain.startIndex
var sliceEnd = domain.startIndex.advancedBy(substringCount)
for var i = 0;; ++i {
for var i = 0;; ++i {
if domain[sliceStart..<sliceEnd] == substring {
return sliceStart
}
Expand Down
4 changes: 2 additions & 2 deletions test/Constraints/generic_overload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var f2_x1_x1b = f2(x1, x1b)
i = f2_x1_x1b

// Overloading of struct methods
struct StructOverload<U> {
struct StructOverload<U> {
func f0<T : P1>(u: U, t: T) -> Int { return 0 }
func f0<T : P2>(u: U, t: T) -> Double { return 0 }

Expand All @@ -65,7 +65,7 @@ var so_f1_x2 = SO.f1(5, t: x2)
d = so_f1_x2

// Overloading of class methods
class ClassOverloadA<U> {
class ClassOverloadA<U> {
func f0<T : P1>(u: U, t: T) -> Int { return 0 }
func f1<T : P2>(u: U, t: T) -> Double { return 0 }
}
Expand Down
2 changes: 1 addition & 1 deletion test/IRGen/class_bounded_generics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,6 @@ func class_bounded_metatype<T: SomeSwiftClass>(t : T) {
t.dynamicType.foo()
}

class WeakRef<T: AnyObject> {
class WeakRef<T: AnyObject> {
weak var value: T?
}
2 changes: 1 addition & 1 deletion test/Interpreter/generics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func checkOverloadResolution() {
}
checkOverloadResolution()

class Base {
class Base {
var v = 0
required init() {}
func map() {
Expand Down
2 changes: 1 addition & 1 deletion test/Prototypes/FloatingPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ extension BinaryFloatingPointType {
}

public static func sqrt<X: BinaryFloatingPointType>(x: X) -> Self {
if X._fractionalBitCount <= Self._fractionalBitCount { return sqrt(Self(x)) }
if X._fractionalBitCount <= Self._fractionalBitCount { return sqrt(Self(x)) }
return Self(X._sqrtStickyRounding(x))
}

Expand Down
2 changes: 1 addition & 1 deletion test/Prototypes/Integers.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public typealias UWord = UInt${word_bits}

public protocol IntegerType
: Comparable, ArithmeticType,
IntegerLiteralConvertible, CustomStringConvertible {
IntegerLiteralConvertible, CustomStringConvertible {

// Dispatching through these puts less stress on the user reading
// the interface and error messages (and on the type checker) than
Expand Down
2 changes: 1 addition & 1 deletion test/SILGen/let_decls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func testGetOnlySubscript(x : GetOnlySubscriptStruct, idx : Int) -> Int {
extension Optional {
func getLV() -> Int { }
}
struct CloseOverAddressOnlyConstant<T> {
struct CloseOverAddressOnlyConstant<T> {
func isError() {
let AOV = Optional<T>()
takeClosure({ AOV.getLV() })
Expand Down
2 changes: 1 addition & 1 deletion test/SILPasses/copyforward.sil
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ sil @f_in_guaranteed : $@convention(thin) <T> (@in_guaranteed T) -> ()
sil @f_out : $@convention(thin) <T> (@out T) -> ()
sil @f_owned : $@convention(thin) <T> (@owned T) -> ()

protocol P {
protocol P {
init(_ i : Int32)
};

Expand Down
2 changes: 1 addition & 1 deletion test/SILPasses/definite_init_diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ class ClassWhoseInitDoesntReturn : BaseWithConvenienceInits {
}

// <rdar://problem/17233681> DI: Incorrectly diagnostic in delegating init with generic enum
enum r17233681Lazy<T> {
enum r17233681Lazy<T> {
case Thunk(() -> T)
case Value(T)

Expand Down
2 changes: 1 addition & 1 deletion test/SILPasses/devirt_static_witness_method.sil
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Builtin
import Swift
import SwiftShims

protocol CanAdd {
protocol CanAdd {
func +(lhs: Self, rhs: Self) -> Self
}

Expand Down
4 changes: 2 additions & 2 deletions test/Sema/availability_versions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ class ClassWithDeclarationsOfUnavailableClasses {
func unavailableMethodWithUnavailableParameterType(o : ClassAvailableOn10_10) {
}

func methodWithUnavailableReturnType() -> ClassAvailableOn10_10 { // expected-error {{'ClassAvailableOn10_10' is only available on OS X 10.10 or newer}}
func methodWithUnavailableReturnType() -> ClassAvailableOn10_10 { // expected-error {{'ClassAvailableOn10_10' is only available on OS X 10.10 or newer}}
// expected-note@-1 {{add @available attribute to enclosing class}}
// expected-note@-2 {{add @available attribute to enclosing instance method}}

Expand All @@ -768,7 +768,7 @@ class ClassWithDeclarationsOfUnavailableClasses {
}

@available(OSX, introduced=10.10)
func unavailableMethodWithUnavailableReturnType() -> ClassAvailableOn10_10 {
func unavailableMethodWithUnavailableReturnType() -> ClassAvailableOn10_10 {
return ClassAvailableOn10_10()
}

Expand Down