mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Macros] Don't invoke ResolveMacroRequest for the same custom attribute with
different DeclContexts.
This commit is contained in:
@@ -698,7 +698,7 @@ bool SemaAnnotator::handleCustomAttributes(Decl *D) {
|
||||
// If this attribute resolves to a macro, index that.
|
||||
ASTContext &ctx = D->getASTContext();
|
||||
ResolveMacroRequest req{const_cast<CustomAttr *>(customAttr),
|
||||
D->getInnermostDeclContext()};
|
||||
D->getDeclContext()};
|
||||
if (auto macroDecl = evaluateOrDefault(ctx.evaluator, req, nullptr)) {
|
||||
Type macroRefType = macroDecl->getDeclaredInterfaceType();
|
||||
if (!passReference(
|
||||
|
||||
Reference in New Issue
Block a user