mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Refactor Macro Context Lookup Into a Request
This commit is contained in:
committed by
Doug Gregor
parent
394d0645d9
commit
0fc80dc498
@@ -2474,7 +2474,8 @@ ConstraintSystem::getTypeOfMemberReference(
|
||||
#if SWIFT_SWIFT_PARSER
|
||||
Type ConstraintSystem::getTypeOfMacroReference(StringRef macroName,
|
||||
Expr *anchor) {
|
||||
auto macroCtx = swift::macro_context::lookup(macroName, DC);
|
||||
auto req = MacroContextRequest{macroName.str(), DC->getParentModule()};
|
||||
auto *macroCtx = evaluateOrDefault(getASTContext().evaluator, req, nullptr);
|
||||
if (!macroCtx)
|
||||
return Type();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user