We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 886d8cc commit 39a038aCopy full SHA for 39a038a
clang/include/clang/AST/ASTContext.h
@@ -819,6 +819,15 @@ class ASTContext : public RefCountedBase<ASTContext> {
819
820
bool hasFeatureAvailabilityAttr(const Decl *D) const;
821
822
+ /// Retrieve the \c VarDecl that represents the feature availability domain
823
+ /// with the given name.
824
+ VarDecl *getFeatureAvailDecl(StringRef Name) const {
825
+ auto It = AvailabilityDomainMap.find(Name);
826
+ if (It != AvailabilityDomainMap.end())
827
+ return It->second;
828
+ return nullptr;
829
+ }
830
+
831
// Retrieve availability domain information for a feature.
832
AvailabilityDomainInfo getFeatureAvailInfo(StringRef FeatureName) const;
833
0 commit comments