improve the source location information for { and } in a ClosureExpr, by

actually tracking it. NFC.


Swift SVN r28801
This commit is contained in:
Chris Lattner
2015-05-20 00:10:04 +00:00
parent 52bf6623e8
commit 66916683a2
7 changed files with 60 additions and 31 deletions

View File

@@ -1064,9 +1064,11 @@ static Expr *buildMaterializeForSetCallback(ASTContext &ctx,
args->setImplicit();
// Create the closure expression itself.
auto closure = new (ctx) ClosureExpr(args, SourceLoc(), SourceLoc(),
auto closure = new (ctx) ClosureExpr(SourceLoc(),
args, SourceLoc(), SourceLoc(),
SourceLoc(), TypeLoc(),
/*discriminator*/ 0, materializeForSet);
/*discriminator*/ 0, SourceLoc(),
materializeForSet);
// Generate the body of the closure.
SmallVector<ASTNode, 4> body;