Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines

This commit is contained in:
Max Moiseev
2016-01-04 12:25:25 -08:00
1513 changed files with 30863 additions and 11927 deletions

View File

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2015 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
@@ -491,6 +491,10 @@ void ConformanceLookupTable::expandImpliedConformances(NominalTypeDecl *nominal,
// may be reallocated during this traversal, so pay the lookup cost
// during each iteration.
for (unsigned i = 0; i != AllConformances[dc].size(); ++i) {
/// FIXME: Avoid the possibility of an infinite loop by fixing the root
/// cause instead (incomplete circularity detection).
assert(i <= 16384 &&
"Infinite loop due to circular protocol inheritance?");
ConformanceEntry *conformanceEntry = AllConformances[dc][i];
ProtocolDecl *conformingProtocol = conformanceEntry->getProtocol();