Skip to content

Commit 263e2f7

Browse files
committed
---
yaml --- r: 345563 b: refs/heads/master c: 87c8443 h: refs/heads/master i: 345561: 67b09a1 345559: 3086e78
1 parent 764f61d commit 263e2f7

File tree

3 files changed

+1
-30
lines changed

3 files changed

+1
-30
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: 31943a90d7e7c9d3cee953b0cc45783f8706ee20
2+
refs/heads/master: 87c8443f8e8158039bdaabfc9b1a61e54c2a89bb
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/include/swift/AST/TypeRepr.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ class alignas(8) TypeRepr {
164164

165165
/// Clone the given type representation.
166166
TypeRepr *clone(const ASTContext &ctx) const;
167-
168-
/// Visit the top-level types in the given type representation,
169-
/// which includes the types referenced by \c IdentTypeReprs either
170-
/// directly or within a protocol composition type.
171-
///
172-
/// \param visitor Each top-level type representation is passed to the visitor.
173-
void visitTopLevelTypeReprs(llvm::function_ref<void(IdentTypeRepr *)> visitor);
174167
};
175168

176169
/// \brief A TypeRepr for a type with a syntax error. Can be used both as a

trunk/lib/AST/TypeRepr.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -263,28 +263,6 @@ TypeRepr *TypeRepr::clone(const ASTContext &ctx) const {
263263
return visitor.visit(const_cast<TypeRepr *>(this));
264264
}
265265

266-
void TypeRepr::visitTopLevelTypeReprs(
267-
llvm::function_ref<void(IdentTypeRepr *)> visitor) {
268-
TypeRepr *typeRepr = this;
269-
270-
// Look through attributed type representations.
271-
while (auto attr = dyn_cast<AttributedTypeRepr>(typeRepr))
272-
typeRepr = attr->getTypeRepr();
273-
274-
// Handle identifier type representations.
275-
if (auto ident = dyn_cast<IdentTypeRepr>(typeRepr)) {
276-
visitor(ident);
277-
return;
278-
}
279-
280-
// Recurse into protocol compositions.
281-
if (auto composition = dyn_cast<CompositionTypeRepr>(typeRepr)) {
282-
for (auto type: composition->getTypes())
283-
type->visitTopLevelTypeReprs(visitor);
284-
return;
285-
}
286-
}
287-
288266
void ErrorTypeRepr::printImpl(ASTPrinter &Printer,
289267
const PrintOptions &Opts) const {
290268
Printer << "<<error type>>";

0 commit comments

Comments
 (0)