[CodeComplete] Offer code completion for attached macro attributes

We need to teach code completion how to invoke the type checker for attached macro attributes. After that, everything started working.

rdar://105232015
This commit is contained in:
Alex Hoppen
2023-05-01 21:11:24 -07:00
parent 9c68aaac2d
commit 01cebd68a8
6 changed files with 52 additions and 23 deletions

View File

@@ -445,8 +445,7 @@ void Decl::forEachAttachedMacro(MacroRole role,
MacroDecl *Decl::getResolvedMacro(CustomAttr *customAttr) const {
auto declRef = evaluateOrDefault(
getASTContext().evaluator,
ResolveMacroRequest{customAttr, this},
ConcreteDeclRef());
ResolveMacroRequest{customAttr, getDeclContext()}, ConcreteDeclRef());
return dyn_cast_or_null<MacroDecl>(declRef.getDecl());
}