Skip to content

Commit 44cc14a

Browse files
author
David Ungar
committed
Start lookup *outside* of D when D is, e.g. an ExtensionDecl, since the attribute is outside of it.
1 parent b5c0b6d commit 44cc14a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/Sema/TypeCheckAttr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2643,7 +2643,7 @@ void AttributeChecker::visitFrozenAttr(FrozenAttr *attr) {
26432643
}
26442644

26452645
void AttributeChecker::visitCustomAttr(CustomAttr *attr) {
2646-
auto dc = D->getInnermostDeclContext();
2646+
auto dc = D->getDeclContext();
26472647

26482648
// Figure out which nominal declaration this custom attribute refers to.
26492649
auto nominal = evaluateOrDefault(

0 commit comments

Comments
 (0)