mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Provide macro module name in MacroExpansionExpr creation
This properly passes the module name through from attached macros to the freestanding macro that are used under-the-hood for type checking.
This commit is contained in:
@@ -3032,7 +3032,9 @@ namespace {
|
||||
auto macro = cast<MacroDecl>(overload.choice.getDecl());
|
||||
ConcreteDeclRef macroRef = resolveConcreteDeclRef(macro, locator);
|
||||
auto *expansion = MacroExpansionExpr::create(
|
||||
dc, expr->getStartLoc(), DeclNameRef(macro->getName()),
|
||||
dc, expr->getStartLoc(),
|
||||
/*module name=*/DeclNameRef(), /*module name loc=*/DeclNameLoc(),
|
||||
DeclNameRef(macro->getName()),
|
||||
DeclNameLoc(expr->getLoc()), SourceLoc(), {}, SourceLoc(), nullptr,
|
||||
MacroRole::Expression, /*isImplicit=*/true, expandedType);
|
||||
expansion->setMacroRef(macroRef);
|
||||
|
||||
Reference in New Issue
Block a user