Add support for attributes on closures.

This commit is contained in:
Doug Gregor
2021-02-16 16:26:22 -08:00
parent 2f584b5cc6
commit 8448e61b3a
11 changed files with 99 additions and 10 deletions

View File

@@ -226,7 +226,8 @@ private:
// Create the closure.
auto *Params = ParameterList::createEmpty(Ctx);
auto *Closure = new (Ctx)
ClosureExpr(SourceRange(), nullptr, Params, SourceLoc(), SourceLoc(),
ClosureExpr(DeclAttributes(), SourceRange(), nullptr, Params,
SourceLoc(), SourceLoc(),
SourceLoc(), SourceLoc(), nullptr,
DF.getNextDiscriminator(), getCurrentDeclContext());
Closure->setImplicit(true);