Skip to content

Commit 42ba728

Browse files
authored
Merge pull request #10439 from tshortli/feature-avail-decl-lookup-swift-6.2
[swift/release/6.2] Store the backing decl on AvailabilityDomainInfo
2 parents 5e65268 + f890035 commit 42ba728

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/include/clang/AST/ASTContext.h

+1
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,7 @@ class ASTContext : public RefCountedBase<ASTContext> {
804804

805805
struct AvailabilityDomainInfo {
806806
FeatureAvailKind Kind = FeatureAvailKind::None;
807+
Decl *Decl = nullptr;
807808
ImplicitCastExpr *Call = nullptr;
808809
bool isInvalid() const { return Kind == FeatureAvailKind::None; }
809810
};

clang/lib/AST/ASTContext.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ ASTContext::getFeatureAvailInfo(Decl *D) const {
950950
llvm_unreachable("invalid feature kind");
951951
}
952952

953-
ASTContext::AvailabilityDomainInfo Info{Kind, nullptr};
953+
ASTContext::AvailabilityDomainInfo Info{Kind, D, nullptr};
954954

955955
if (Kind == FeatureAvailKind::Dynamic) {
956956
Expr *FnExpr = Init->getInit(1);

0 commit comments

Comments
 (0)