We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a09f8f commit 268fc50Copy full SHA for 268fc50
clang/include/clang/AST/ASTContext.h
@@ -840,6 +840,15 @@ class ASTContext : public RefCountedBase<ASTContext> {
840
841
bool hasFeatureAvailabilityAttr(const Decl *D) const;
842
843
+ /// Retrieve the \c VarDecl that represents the feature availability domain
844
+ /// with the given name.
845
+ VarDecl *getFeatureAvailDecl(StringRef Name) const {
846
+ auto It = AvailabilityDomainMap.find(Name);
847
+ if (It != AvailabilityDomainMap.end())
848
+ return It->second;
849
+ return nullptr;
850
+ }
851
+
852
// Retrieve availability domain information for a feature.
853
AvailabilityDomainInfo getFeatureAvailInfo(StringRef FeatureName) const;
854
0 commit comments