Skip to content

Commit 883a9ee

Browse files
committed
[ASTWalker] Walk the TypeReprs of UnresolvedSpecializeExprs so we can syntax-annotate them.
Swift SVN r8879
1 parent cb4e51c commit 883a9ee

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/AST/ASTWalker.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,18 @@ class Traversal : public ASTVisitor<Traversal, Expr*, Stmt*,
241241
if (!E->getSubExpr())
242242
return E;
243243

244-
if (Expr *Sub = doIt(E->getSubExpr())) {
244+
if (Expr *Sub = doIt(E->getSubExpr()))
245245
E->setSubExpr(Sub);
246-
return E;
246+
else
247+
return nullptr;
248+
249+
for (auto &TyLoc : E->getUnresolvedParams()) {
250+
if (TyLoc.getTypeRepr())
251+
if (doIt(TyLoc.getTypeRepr()))
252+
return nullptr;
247253
}
248-
return nullptr;
254+
255+
return E;
249256
}
250257

251258
Expr *visitTupleElementExpr(TupleElementExpr *E) {

0 commit comments

Comments
 (0)