Skip to content

Commit c339eda

Browse files
committed
---
yaml --- r: 345919 b: refs/heads/master c: 35e9c1a h: refs/heads/master i: 345917: f47b204 345915: 7a5c7b4 345911: aec7a83 345903: 81d738b 345887: 5c03d1d 345855: a070bb2
1 parent 624dbb7 commit c339eda

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 40b00db3e2767c44ac67ecd9f19f53d4708620ab
2+
refs/heads/master: 35e9c1a384b939a69ac2198f19061bff3d801896
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/lib/ClangImporter/ImportDecl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7040,7 +7040,7 @@ void SwiftDeclConverter::importInheritedConstructors(
70407040

70417041
auto curObjCClass = cast<clang::ObjCInterfaceDecl>(classDecl->getClangDecl());
70427042

7043-
auto inheritConstructors = [&](ArrayRef<ValueDecl *> members,
7043+
auto inheritConstructors = [&](TinyPtrVector<ValueDecl *> members,
70447044
Optional<CtorInitializerKind> kind) {
70457045
const auto &languageVersion =
70467046
Impl.SwiftContext.LangOpts.EffectiveLanguageVersion;

trunk/lib/SILOptimizer/Utils/CastOptimizer.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -354,17 +354,15 @@ SILInstruction *CastOptimizer::optimizeBridgedSwiftToObjCCast(
354354

355355
auto *NTD = Source.getNominalOrBoundGenericNominal();
356356
assert(NTD);
357-
SmallVector<ValueDecl *, 4> FoundMembers;
358-
ArrayRef<ValueDecl *> Members;
359-
Members = NTD->lookupDirect(M.getASTContext().Id_bridgeToObjectiveC);
357+
auto Members = NTD->lookupDirect(M.getASTContext().Id_bridgeToObjectiveC);
360358
if (Members.empty()) {
359+
SmallVector<ValueDecl *, 4> FoundMembers;
361360
if (NTD->getDeclContext()->lookupQualified(
362361
NTD, M.getASTContext().Id_bridgeToObjectiveC,
363362
NLOptions::NL_ProtocolMembers, FoundMembers)) {
364-
Members = FoundMembers;
365363
// Returned members are starting with the most specialized ones.
366364
// Thus, the first element is what we are looking for.
367-
Members = Members.take_front(1);
365+
Members.push_back(FoundMembers.front());
368366
}
369367
}
370368

trunk/lib/Sema/CSDiag.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7084,7 +7084,7 @@ bool FailureDiagnosis::visitObjectLiteralExpr(ObjectLiteralExpr *E) {
70847084
return false;
70857085
DeclName constrName = TC.getObjectLiteralConstructorName(E);
70867086
assert(constrName);
7087-
ArrayRef<ValueDecl *> constrs = protocol->lookupDirect(constrName);
7087+
auto constrs = protocol->lookupDirect(constrName);
70887088
if (constrs.size() != 1 || !isa<ConstructorDecl>(constrs.front()))
70897089
return false;
70907090
auto *constr = cast<ConstructorDecl>(constrs.front());

trunk/lib/Sema/CSGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,7 @@ namespace {
13061306
// use the right labels before forming the call to the initializer.
13071307
DeclName constrName = tc.getObjectLiteralConstructorName(expr);
13081308
assert(constrName);
1309-
ArrayRef<ValueDecl *> constrs = protocol->lookupDirect(constrName);
1309+
auto constrs = protocol->lookupDirect(constrName);
13101310
if (constrs.size() != 1 || !isa<ConstructorDecl>(constrs.front())) {
13111311
tc.diagnose(protocol, diag::object_literal_broken_proto);
13121312
return nullptr;

0 commit comments

Comments
 (0)