We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 100a794 commit 7ed123aCopy full SHA for 7ed123a
lib/AST/Decl.cpp
@@ -571,12 +571,9 @@ const Decl *Decl::getInnermostDeclWithAvailability() const {
571
572
std::optional<llvm::VersionTuple>
573
Decl::getIntroducedOSVersion(PlatformKind Kind) const {
574
- for (auto *attr: getAttrs()) {
575
- if (auto *ava = dyn_cast<AvailableAttr>(attr)) {
576
- if (ava->getPlatform() == Kind && ava->Introduced) {
577
- return ava->Introduced;
578
- }
579
+ for (auto attr : getSemanticAvailableAttrs()) {
+ if (attr.getPlatform() == Kind && attr.getIntroduced().has_value())
+ return attr.getIntroduced();
580
}
581
return std::nullopt;
582
0 commit comments