[AST/ASTGen] Introduce @concurrent attribute to replace @execution(concurrent) spelling

This commit is contained in:
Pavel Yaskevich
2025-04-01 16:51:57 -07:00
parent 1a3af5c91d
commit 2704ab7337
10 changed files with 61 additions and 9 deletions

View File

@@ -1414,8 +1414,10 @@ FunctionType::ExtInfo ClosureEffectsRequest::evaluate(
bool async = expr->getAsyncLoc().isValid();
bool sendable = expr->getAttrs().hasAttribute<SendableAttr>();
// `@execution(...)` attribute is only valid on asynchronous function types.
if (expr->getAttrs().hasAttribute<ExecutionAttr>()) {
// `@execution(...)` and `@concurrent` attributes are only
// valid on asynchronous function types.
if (expr->getAttrs().hasAttribute<ExecutionAttr>() ||
expr->getAttrs().hasAttribute<ConcurrentAttr>()) {
async = true;
}